Socket
Socket
Sign inDemoInstall

waait

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    waait

A little function to wait


Version published
Weekly downloads
53K
decreased by-26.21%
Maintainers
1
Install size
3.51 kB
Created
Weekly downloads
 

Readme

Source

build status

Waait

Hold on a sec, or 7.

wait() Returns a promise that resolves after how many milliseconds you pass it.

Great for waiting any amount of time. If you do not pass it any value, it will immediately resolve. This is handy when you need to ensure the following code is put at the end of the JS event callstack.

Usage

import wait from 'waait';

async function doStuff() {
  doSomething();
  await wait();
  doSomethingElse();
  await wait(200);
  console.log('200ms later');
}

FAQs

Last updated on 06 Jun 2019

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