Socket
Socket
Sign inDemoInstall

wait

Package Overview
Dependencies
0
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wait

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


Version published
Weekly downloads
5.7K
decreased by-17.66%
Maintainers
2
Install size
5.52 kB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 26 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc