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

1.0.1 • Public • Published

pause-for

A tiny JavaScript utility for delaying the execution.

Installation

npm install pause-for

Usage

const pauseFor = require('pause-for');

doSomething1();
await pauseFor(1000);
doSomething2();
await pauseFor(500);
doSomething3();

API

pauseFor(ms: number): Promise<void>

Parameters

ms: The number of milliseconds to wait before resolving the promise.

Returns

A promise that will be resolved after the specified number of milliseconds.

Readme

Keywords

Package Sidebar

Install

npm i pause-for

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

2.95 kB

Total Files

6

Last publish

Collaborators

  • rimaai