sleep3
v1.0.0
Published
Aysnc sleep, used on ES6+ (async/await), Support string parameters like '10s' '5m', and numeric parameters millisecond.
Downloads
2
Readme
sleep3
Aysnc sleep, used on ES6+ (async/await).
Support string parameters like '10s' '5m', and numeric parameters millisecond.
Installation
npm install sleep3
Usage
const sleep = require('sleep3');
(async () => {
console.log('begin');
await sleep('10s');
console.log('end');
})();
Support string parameters
's', 'm', 'h', 'd'
like '3s', '2m', '1h35s'