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