try-to
Try to do a task, try again if it fails, backing-off with a customisable algorithm, and returning a promise.
npm install try-to --save
Usage
A simple example, illustrating all of the main API features.
'use strict';const tryto = ; // start retrying at 100ms intervals // max 20 retries // exponential back-off // cap it to 1,000s retries // start trying immediately ;
API Docs
For complete API docs see API.md.