Created
March 28, 2017 23:46
-
-
Save michel-zimmer/988305c0335154442b647051c9be8c99 to your computer and use it in GitHub Desktop.
Timeout the Promise chain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = ms => res => new Promise(resolve => setTimeout(() => { resolve(res) }, ms || 500)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment