Skip to content

Instantly share code, notes, and snippets.

@Razenbull
Created July 23, 2015 12:13
Show Gist options
  • Save Razenbull/e1d252751f1e9719d1f6 to your computer and use it in GitHub Desktop.
Save Razenbull/e1d252751f1e9719d1f6 to your computer and use it in GitHub Desktop.
Promise function to delay an action when fullfilled
/**
*
* @param delay
* @returns {Promise}
*/
function promiseDelay(delay) {
return new Promise(function(resolve) {
setTimeout(resolve, delay);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment