(require("wait"))(delay) → {Promise}
Sugar around window.setTimeout
.
Parameters:
Name |
Type |
Description |
delay |
number
|
The number of milliseconds to wait |
- Source:
Returns:
-
Type
-
Promise
Example
import wait from './wait';
wait( 150 )
.then( () => {
// Continue processing...
} );