Skip to content

Instantly share code, notes, and snippets.

@leonidkuznetsov18
Created April 30, 2020 18:11
Show Gist options
  • Select an option

  • Save leonidkuznetsov18/b40c6361978d1ac96ee3d2b995623c72 to your computer and use it in GitHub Desktop.

Select an option

Save leonidkuznetsov18/b40c6361978d1ac96ee3d2b995623c72 to your computer and use it in GitHub Desktop.
delay promise
const delayPromise = (delay) => {
return function(data) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(data);
}, delay);
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment