1.1.1 • Published 1 year ago

paused v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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