1.0.0 • Published 2 years ago

espera v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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