1.1.0 • Published 6 years ago

p-sleep v1.1.0

Weekly downloads
1,224
License
MIT
Repository
github
Last release
6 years ago

p-sleep

Promisified sleep function.

Installation

npm install --save p-sleep

Usage

const sleep = require('p-sleep')

sleep(200).then(() => console.log('World!'))
sleep(100).then(() => console.log('Hello,'))

API

sleep(ms: number) => Promise<void>

Returns a Promise that resolves after ms milliseconds.