Skip to content

ealush/wait

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Async Awaitables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published