Skip to content

Commit

Permalink
Use pify
Browse files Browse the repository at this point in the history
I didn't realize the `util.promisify` polyfill was so bloated...
  • Loading branch information
sindresorhus committed Jun 26, 2018
1 parent 8f30e19 commit b1a3920
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
const fs = require('fs');
const path = require('path');
const parseJson = require('parse-json');
const promisify = require('util.promisify');
const pify = require('pify');

const readFileAsync = promisify(fs.readFile);
const readFileAsync = pify(fs.readFile);

module.exports = options => {
options = Object.assign({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"normalize-package-data": "^2.3.2",
"parse-json": "^4.0.0",
"util.promisify": "^1.0.0"
"pify": "^3.0.0"
},
"devDependencies": {
"ava": "*",
Expand Down

0 comments on commit b1a3920

Please sign in to comment.