paused
v1.1.1
Published
A very tiny awaitable timer
Downloads
8
Maintainers
Readme
paused
A very tiny no dependency awaitable timer.
This package is available in ESM and CJS formats
Installation
npm i paused
Usage
import { paused } from 'paused';
// OR
const { paused } = require('paused');
async function hello() {
// with just timeout in ms
await paused(2000);
// with timeout and value that is resolved
const value = await paused(4000, 'world');
console.log(value); // world
}
License
MIT © Manan Joshi