1
0
mirror of synced 2025-12-21 19:06:49 -05:00
Files
docs/lib/readfile-async.js
James M. Greene 9e31597ee4 Use promisified fs.readFile instead of fs.promises.readFile (#18204)
* Create a readFileAsync wrapper module

* Use the readFileAsync wrapper module instead of fs.promises.readFile

* Fix require path in test
2021-03-10 17:57:10 +00:00

7 lines
223 B
JavaScript

const fs = require('fs')
const util = require('util')
// This is faster than using `fs.promises.readFile` for the time being
// See: https://github.com/nodejs/node/issues/37583
module.exports = util.promisify(fs.readFile)