Socket
Socket
Sign inDemoInstall

promisify-wait

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    promisify-wait

Simple promisify wait function


Version published
Maintainers
1
Created

Readme

Source

Promisify Wait

Promisify wait is a simple function to await timeout

Installation

To use promisify-wait in your project, using npm:

npm install promisify-wait

or using yarn:

yarn add promisify-wait

Usage

import wait, { DURATION_UNIT } from "promisify-wait";

# wait 1000 milliseconds
await wait(1000) #Default in millisecond

# wait 10 seconds
await wait(10, DURATION_UNIT.SECOND)

# wait 1 minute 
await wait(1, DURATION_UNIT.MINUTE)

# wait 1 hour
await wait(1, DURATION_UNIT.HOUR)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Keywords

FAQs

Last updated on 16 Oct 2022

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