1.0.1 • Published 1 year ago

pause-for v1.0.1

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

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.

1.0.1

1 year ago

1.0.0

1 year ago