Created
September 28, 2017 16:25
-
-
Save evantahler/b6e1f21288a3060342a24dc32df69719 to your computer and use it in GitHub Desktop.
util.promisify
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 {promisify} = require('util') | |
async sleep (time) { | |
return promisify(setTimeout)(time) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment