dastal - v5.0.0 / ArrayUtils
▸ isArray<T>(obj): obj is T[]
Check if a value is an Array or TypedArray.
| Name | Type |
|---|---|
T |
T = any |
| Name | Type | Description |
|---|---|---|
obj |
unknown |
The value to check. |
obj is T[]
true if an Array or TypedArray, otherwise false.
▸ Const isTypedArray<T>(obj): obj is T[]
Check if a value is a TypedArray.
See MDN for more details.
| Name | Type |
|---|---|
T |
T = any |
| Name | Type | Description |
|---|---|---|
obj |
unknown |
The value to check. |
obj is T[]
true if a TypedArray, otherwise false.
▸ splice<T>(array, start?, count?, elements?): T[]
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
Contrary to Array.splice, this will not throw an error if too many new elements are given as arguments.
| Name |
|---|
T |
| Name | Type | Description |
|---|---|---|
array |
T[] |
The array to splice. |
start? |
number |
The zero-based location in the array from which to start removing elements. |
count? |
number |
The number of elements to remove. |
elements? |
T[] |
The new elements to splice in. |
T[]
- An array containing the deleted elements.