Methods
greenSlice(array)
Slices, but uses a recycled array. Note that this slice does not accept parameters and makes a shallow copy of the original array.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
array |
Array
|
The array to copy. |
Returns:
Array
greenSplice(array, index) → {any}
Splices, but only removes a single item and returns the item itself, not an array.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
array |
Array
|
The array from which an item is to be extracted. |
index |
Number
|
The index of the item to extract. |
Returns:
- Type:
-
any
greenSplit(str, splitteropt)
Splits a string, but populates an array from the array cache instead of creating a new one.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
str |
String
|
String to split. |
|
splitter |
String
|
<optional> |
String demarking where to split. If not provided, each character in the split string becomes an array item. |
Returns:
Array
union(arrayTo)
Merges items from one array into the other, making sure to not duplicate identical entries.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
arrayTo |
Array
|
The array into which items will be inserted. |
...arrayFrom |
Array
|
The array(s) containing items to be merged. |
Returns:
Array