@esutils/delay
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

A minimal delay/sleep library that implemented in typescript

This delay library can be used by es module, commonjs module and typescript module. delay are used to async sleep or delay some time.

Examples

Usage in typescript module, file with .ts extension

import { delay } from '@esutils/delay';

async function demo() {
  console.log(`Start ${Date.now()}`);
  await delay(100);
  console.log(`End ${Date.now()}`);
}

demo();

Package Sidebar

Install

npm i @esutils/delay

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

5.52 kB

Total Files

23

Last publish

Collaborators

  • lygstate