Skip to content

Instantly share code, notes, and snippets.

Tuktarov Renat yandzee

Block or report user

Report or block yandzee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
yandzee / index.js
Created Nov 8, 2017
Code retry with promises
View index.js
// Author: Renat Tuktarov (
const retry = function(fn, prev) {
return new Promise((current, reject) => {
const resolve = _ => (prev && prev()) || current();
fn(resolve, delay => {
setTimeout(_ => {
retry(fn, resolve);
}, delay);
You can’t perform that action at this time.