Last active
April 10, 2016 01:23
-
-
Save huttj/2112082398dc3adddee11680288b24a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
'use strict'; | |
module.exports = function nodePromise(fn) { | |
return new Promise((resolve, reject) => { | |
fn((err, res) => err ? reject(err) : resolve(res)); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment