pwait

1.0.1 • Public • Published

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');
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0

Package Sidebar

Install

npm i pwait

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • longbill