paused
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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

Package Sidebar

Install

npm i paused

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

3.92 kB

Total Files

6

Last publish

Collaborators

  • manan_joshi