1.0.4 • Published 5 years ago

testingwaitts v1.0.4

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

waiit

Wait for any amount of time in milliseconds or resolve immediately if no value passed.

Example

wait() // Returns a promise that resolves immediately
wait(5000) // Returns a promise that resolves after 5sec

Install

npm i waiit

Usage

import wait from 'wait';

async function doSomething() {
  console.log(`Start`);
  await wait(5000);
  console.log(`Wait`);
  await wait();
  console.log(`Finish`);
}
1.0.4

5 years ago