Skip to content

Instantly share code, notes, and snippets.

@javarouka
Last active May 15, 2017 15:51
Show Gist options
  • Save javarouka/e076d7577412db859f5b0f8f69f9e29e to your computer and use it in GitHub Desktop.
Save javarouka/e076d7577412db859f5b0f8f69f9e29e to your computer and use it in GitHub Desktop.
play promise post example code
const timeBomb = (millis, misfire =_=> {}) => new Promise( (resolve, reject) => {
setTimeout( () => misfire() ? resolve() : reject(), millis );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment