wait
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

wait - Awaitable Delay

Wait is a promise wrapped setTimeout. That's it. Use it for a nicer delay interface.

import wait from 'wait';
 
async function myAsyncFunction() {
  await wait(300);
 
  // do some stuff here
}

You can also use it as a simple sleep for your cli apps:

echo Hi
npx wait 2000 # Will pause execution for 2 seconds. 
echo Bye

Readme

Keywords

none

Package Sidebar

Install

npm i wait

Weekly Downloads

5,593

Version

0.4.2

License

MIT

Unpacked Size

4.67 kB

Total Files

15

Last publish

Collaborators

  • trevorburnham
  • ealush