UTILS
Methods
(static) deduplicate($array) → {Array.<T>}
- Description:
- Deduplicates the items of the given array (a new array is created).
- Source:
Parameters:
Name |
Type |
Description |
$array |
Array.<T>
|
The array. |
Returns:
-
Type
-
Array.<T>
- Description:
- Extracts the given item from the given array.
- Source:
Parameters:
Name |
Type |
Description |
$item |
T
|
The item to remove. |
$array |
Array.<T>
|
The array. |
Returns:
-
Type
-
Array.<T>
(static) frame() → {Promise.<number>}
- Description:
- Resolves when the browser is ready to perform an animation frame request.
- Source:
Returns:
-
Type
-
Promise.<number>
(static) ready() → {Promise.<void>}
- Description:
- Resolves when the user has interacted at least once since page load.
- Source:
Returns:
-
Type
-
Promise.<void>
(static) sleep($delay) → {Promise.<void>}
- Description:
- Resolves when the given delay has passed.
- Source:
Parameters:
Name |
Type |
Description |
$delay |
number
|
The delay (in ms). |
Returns:
-
Type
-
Promise.<void>
(static) uuid() → {string}
- Description:
- Source:
Returns:
-
Type
-
string