-
-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Labels
Description
Instead of passing a function to immediately call it, I'd like to wrap a function to be used later. From:
function runMeNow() {}
function init() {
pRetry(runMeNow, {
bigOptionsObject
}).then(console.log)
}
init();
to:
const runMeRetried = pRetry.wrap(runMeNow, {
bigOptionsObject
});
function init() {
runMeRetried.then(console.log)
}
init();