Methods
absorb(arr) → {Array}
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | Array to be absorbed |
Returns:
this
- Type
- Array
clone() → {Array}
Returns:
Clone of this Array
- Type
- Array
diff(arr) → {Array}
- Description:
- Returns the difference between this Array and given in argument
- Source:
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | Array to compare |
Returns:
Array with elements that are different
- Type
- Array
empty() → {Array}
Returns:
this
- Type
- Array
filterLike(query) → {Array}
- Description:
- Returns the new array based on current one by filtering according to query
- Source:
- See:
-
- Object#isLike
Parameters:
Name | Type | Description |
---|---|---|
query |
Object | Query |
Returns:
New Array with matching elements
- Type
- Array
lookFor(query) → {number}
Parameters:
Name | Type | Description |
---|---|---|
query |
Object | Query |
Returns:
Index of matching index; -1 if not found
- Type
- number
shuffle() → {Array}
Returns:
this
- Type
- Array
unique() → {Array}
Returns:
this
- Type
- Array
(static) deepCloneArrayOfObjects(arr) → {Array.<Object>}
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array of objects |
Returns:
Clone of arr
(static) isEmpty(arr) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | Something to check |
Returns:
Verdict
- Type
- boolean
(static) isInvalidOrEmpty(arr) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | Something to check |
Returns:
Verdict
- Type
- boolean
(static) isNotEmpty(arr) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
arr |
Array | Something to check |
Returns:
Verdict
- Type
- boolean
(static) sortArrayOfObjects(arr, propertyName, descendingopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
arr |
Array.<Object> | Array of objects that should be sorted | ||
propertyName |
string | Name of property by which sorting will be done | ||
descending |
boolean |
<optional> |
false
|
Flag to sort in descending order |
(static) wrap(something) → {Array}
Parameters:
Name | Type | Description |
---|---|---|
something |
* | Array | Something that should be an Array |
Returns:
- Type
- Array