delaying

1.0.2 • Public • Published

Delaying

Simple NodeJs module for delaying execution using promise or async-await

Installation

npm i delaying

Example

const delaying = require('delaying');

const yourFunction = async () => {
  console.log('First time message');
  await delaying('3000'); // 3000 milliseconds = 3 secs
  console.log('Second time message');
}

yourFunction();

License

MIT

Package Sidebar

Install

npm i delaying

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

2.25 kB

Total Files

4

Last publish

Collaborators

  • kresnap