Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
example
// import it!
const { promisify } = require("util")
// turn your ordinary func into a promise func!
const doublePromise = promisify(double)
// use it!
doublePromise(14).then(res => {
console.log(res)
}).catch(err => console.log(err))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment