Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
example
const { readFile } = require('fs')
const { promisify } = require('util')
const readFilePromise = promisify(readFile)
readFilePromise('myFile').then(data => {
console.log(data.toString())
}).catch(e => console.log(e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.