promises-extra
v0.1.2
Published
Adds useful promise helper functions.
Readme
promises-extra
Adds useful promise helper functions.
Supported features
retry(computation, every = 1.5, trials = 10)executescomputationand if it fails, reruns iteverysecond(s) untiltrials.sequence(computations, concurrency = 1)executes a list ofcomputations. Also, allows specifyingconcurrency(must be greater than or equal to 1) which runs at mostconcurrencycomputations in parallel.throttle(computation, delay)executescomputationand makes sure that it takes at leastdelayseconds. Ifcomputationtakes longer thandelay, additional delay will not be applied.
Change log
- 0.0.1 -- Initial release.
- 0.1.0 -- Fix delay bug in
retryfunction. Simplify signature ofsequencefunction. - 0.1.1 -- Add context to
retryto allow abort retrying early. - 0.1.2 -- Add debugging.
