Skip to content

rimaai/pause-for

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A tiny JavaScript utility for delaying the execution.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published