1.0.10 • Published 5 years ago

waait-chadoh v1.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

build status

Waait

Hold on a sec, or 7.

wait() Returns a promise that resolves after how many milliseconds you pass it.

Great for waiting any amount of time. If you do not pass it any value, it will immediately resolve. This is handy when you need to ensure the following code is put at the end of the JS event callstack.

Usage

import wait from 'waait';

async function doStuff() {
  doSomething();
  await wait();
  doSomethingElse();
  await wait(200);
  console.log('200ms later');
}
1.0.10

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago