$ npm install mulligan --save
Mulligan works with any promise library that implements an ES6 style promise constructor. It works by wrapping a resolver function.
var Promise =var mulligan =var promise =
Mulligan takes a function as an optional fourth argument to support conditional
retries. It receives the
error from the last rejection as the first argument.
If the function returns
true it will move on the the next attempt. If the
false the promise will be rejected immediately.