🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

wait

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

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.

0.4.2
latest
Source
npm
Version published
Weekly downloads
6.3K
0.02%
Maintainers
2
Weekly downloads
 
Created
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

Package last updated on 26 Nov 2020

Did you know?

Socket

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