# Global

##

### Methods

#### insert(list, what, where)

  Insert a value or an object in a list

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `list` | Array |
  `what` | * |
  `where` | Number | Index

  ##### Returns:

  - Modified array
  Type
    Array

  ##### Example

      modifiedArray = insert( array, obj, 2 )

#### slice(list, what)

  Remove an object from a list

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `list` | Array |
  `what` | * |

  ##### Returns:

  - Modified list
  Type
    Array

  ##### Example

      modifiedArray = slice( list, obj )

#### unique(list [, filter])

  Remove all duplicate from a list

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `list` | Array |  |
  `filter` | function | <optional> | Optionnal, (currentItem, returnArray) => { should return true or false }

  ##### Returns:

  Type
    Array

  ##### Example

      // Using the native includes function
      modifiedArray = unique( array )

      // With custom function (here, same as default behaviour)
      modifiedArray = unique( array, (currentValue, returnArray) => { return !returnArray.includes(currentValue) } )

#### Search results