-
-
Save kriskowal/7eb961a7eaf84256682c to your computer and use it in GitHub Desktop.
callback-with-promise
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
const fs = require('fs') | |
function readPackage(callback) { | |
return fs.readFile('./package.json').nodeify(callback); | |
} | |
module.exports.readPackage = readPackage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment