espera
v1.0.0
Published
Simple async wrapper to wait for a certain amount of time
Downloads
463
Readme
espera
Simple async wrapper to wait for a certain amount of time.
Installation
Using npm:
npm i espera
Using yarn:
yarn add espera
Usage
Using CommonJS
const { sleep } = require('espera');
Using imports
import { sleep } from 'espera';
Then, in an async function:
// Some code ...
await sleep(4, Unit.seconds); // Will wait 4 seconds before continuing
// Some other code
Documentation
See DOCS