Created
January 4, 2017 15:28
-
-
Save zerobias/7080ba5c1f0b109d35148267fada3fd1 to your computer and use it in GitHub Desktop.
Async pause
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
const resolver = delay => resolve => setTimeout(() => resolve(delay), delay) | |
const pause = (delay=5000) => new Promise(resolver(delay)) | |
module.exports = pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment