Skip to content

Commit b1a3920

Browse files
committed
Use pify
I didn't realize the `util.promisify` polyfill was so bloated...
1 parent 8f30e19 commit b1a3920

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
const fs = require('fs');
33
const path = require('path');
44
const parseJson = require('parse-json');
5-
const promisify = require('util.promisify');
5+
const pify = require('pify');
66

7-
const readFileAsync = promisify(fs.readFile);
7+
const readFileAsync = pify(fs.readFile);
88

99
module.exports = options => {
1010
options = Object.assign({

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"normalize-package-data": "^2.3.2",
3535
"parse-json": "^4.0.0",
36-
"util.promisify": "^1.0.0"
36+
"pify": "^3.0.0"
3737
},
3838
"devDependencies": {
3939
"ava": "*",

0 commit comments

Comments
 (0)