Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/slaveofcode/delaytime

Simple NodeJs module for delaying execution
https://github.com/slaveofcode/delaytime

delay delay-promise promise timeout waiting

Last synced: 3 days ago
JSON representation

Simple NodeJs module for delaying execution

Awesome Lists containing this project

README

        

# 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