Module: wait

(require("wait"))(delay) → {AbortPromise.<void>}

Sugar around window.setTimeout.

Parameters:
Name Type Description
delay number

The number of milliseconds to wait

Source:
Returns:
Type
AbortPromise.<void>
Example
import wait from './wait';

wait( 150 )
  .then( () => {
    // Continue processing...
  } );

Type Definitions

AbortPromise

A Promise usually for a long running or costly request that is abortable.

Type:
  • JQuery.Promise.<T>
Properties:
Name Type Description
abort function
Source: