@tadashi/sleep
v2.0.1
Published
Sweet dreams.
Downloads
37
Readme
sleep
Sweet dreams.
Install
$ npm i -S @tadashi/sleep
API
sleep(duration?: number, fulfilled?: boolean, response?: any): Promise
duration
Type: number
Default: 1
fulfilled
Type: boolean
Default: true
response
Type: any
Default: 'Awake'
Usage
import sleep from '@tadashi/sleep'
console.log('before')
await sleep(2)
console.log('after')
License
MIT © Thiago Lagden