- Source:
Methods
count(arraynon-null, check) → {number}
Count the number of items in the list that pass the check function.
Parameters:
| Name | Type | Description |
|---|---|---|
array |
Array<T> | |
check |
function(T): boolean |
- Source:
Returns:
- Type
- number
defaultEquals(a, b) → {boolean}
Returns whether the two values contain the same value. This correctly
handles comparisons involving NaN.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
T | |
b |
T |
- Source:
Returns:
- Type
- boolean
equal(a, b, compareFn) → {boolean}
Determines if the given arrays contain equal elements in the same order.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Array<T> | |
b |
Array<T> | |
compareFn |
function(T, T): boolean= |
- Source:
Returns:
- Type
- boolean
hasSameElements(anon-null, bnon-null, compareFn) → {boolean}
Determines if the given arrays contain equal elements in any order.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Array<T> | |
b |
Array<T> | |
compareFn |
function(T, T): boolean= |
- Source:
Returns:
- Type
- boolean
partition(arraynon-null, predicate) → {Array<!Array<T>>}
Partitions an array into two arrays based on a predicate.
Returns [matching, notMatching].
Parameters:
| Name | Type | Description |
|---|---|---|
array |
Array<T> | |
predicate |
function(T): boolean |
- Source:
Returns:
- Type
- Array<!Array<T>>
remove(arraynon-null, element)
Remove given element from array (assumes no duplicates).
Parameters:
| Name | Type | Description |
|---|---|---|
array |
Array<T> | |
element |
T |
- Source: