New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pwait

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pwait

Promise based setTimeout with nothing to do

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Install

npm i --save pwait

Usage

async/await:

const wait = require('pwait');
async function doSomething() {
	//...
	await wait(1000); //wait 1000ms and do nothing
	//...
}

Promise:

const wait = require('pwait');
wait(1000).then(()=>{
	console.log('after 1s');
}).then(()=>wait(1000)).then(()=>{
	console.log('another 1s');
});

Keywords

await

FAQs

Package last updated on 10 Oct 2017

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