@proficient/util
v0.2.2
Published
High-quality and essential Typescript utilities
Downloads
5,312
Maintainers
Readme
View the full documentation (docs) ▸
Overview
Installation
# npm
npm install -E @proficient/util
# yarn
yarn add -E @proficient/util
API
makeRetriable
Creates a retriable version of a given function, which, when invoked, is continuously retried according to the specified retry config until it succeeds. The new function returns a Promise that resolves when the original function succeeds or maxTrialCount
is reached.
registerInterval
Registers an async callback that keeps running in the background until it is unregistered. Waits for the callback Promise to resolve and sleeps for an additional duration
ms and invokes the callback again.
sleep
Sleeps for a specified number of milliseconds.
Upgrading
Until we release v1, there may be breaking changes between minor versions (e.g. when upgrading from 0.2 to 0.3). However, all breaking changes will be documented and you can always use our Releases page as a changelog.
License
This project is made available under the MIT License.