abortable-sleep
v1.0.0
Published
Sleep with abort signal support
Downloads
39
Maintainers
Readme
abortable-sleep
The abortable-sleep
is an NPM package that gives you access to awaiatable sleep function with abort signal support.
Installation
To install the package, use the following command in your project:
npm install abortable-sleep
Example
const abortController = new AbortController();
await sleep(1000, abortController.signal);