- Source:
Methods
filter(fun, thisp) → {Array}
Parameters:
Name | Type | Description |
---|---|---|
fun |
function | function to call |
thisp |
object | optional object to call the filter on |
- Source:
Throws:
-
if given fun is not a function
- Type
- TypeError
Returns:
the filtered array
- Type
- Array
forEach(callback)
forEach for Arrays
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | the function call for each element |
- Source:
from() → {Array
Returns an array from a collection
- Source:
Returns:
from collection
- Type
- Array
getUnique() → {Array}
Returns an array of unique elements
- Source:
Returns:
unique elements in Array
- Type
- Array
in_array(needle, partialMatch) → {boolean}
In Array - Function
Parameters:
Name | Type | Description |
---|---|---|
needle |
string | Object | what you are looking for in the Array |
partialMatch |
boolean | if a partial match suffices |
- Source:
Returns:
if the needle is in the haystack
- Type
- boolean
indexOf(val) → {number}
Index of an element in the array or -1 if not found
Parameters:
Name | Type | Description |
---|---|---|
val |
object | the object or value to look for |
- Source:
Returns:
the index in the array or -1 if not found
- Type
- number
isArray() → {boolean}
Is Array?
- Source:
Returns:
if it is an array and not just an object
- Type
- boolean