Methods

merge a function to merge a groups of values in one array(…args)

Parameters:
NameTypeAttributesDescription
argsany<repeatable>
any data type to merge in one array
Returns:
Array of merged elements

removeDuplicates(array, toRemove)

A simple function to remove duplicated elements between two arrays
Parameters:
NameTypeDescription
arrayArrayThe original array
toRemoveArraythe Array of elements to remove
Returns:
New Array without duplicates element

removeFromArray a function to remove an element array(list, toRemove)

Parameters:
NameTypeDescription
listarraythe array to remove the element from it
toRemoveanyany data type to remove
Returns:
an Array of elements without removed value

removeTwins(array, toRemove)

A simple function to remove the element & it twins elements between two arrays
Parameters:
NameTypeDescription
arrayArrayThe original array
toRemoveArraythe Array of elements to remove
Returns:
New Array without duplicates element

toggleArrayValue function to add or remove a value from an array(arr, val) → {Array}

Parameters:
NameTypeDescription
arrArrayarray to check value exists & make toggle
valString | Numbervalue to make toggle
Returns:
new array after toggling
Type: 
Array