diff --git a/node_modules/rollup-plugin-node-polyfills/polyfills/util.js b/node_modules/rollup-plugin-node-polyfills/polyfills/util.js index 2194380..4ef385e 100644 --- a/node_modules/rollup-plugin-node-polyfills/polyfills/util.js +++ b/node_modules/rollup-plugin-node-polyfills/polyfills/util.js @@ -572,6 +572,19 @@ function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +export function promisify(fn) { + return function() { + return new Promise((resolve, reject) => { + fn(...arguments, function(err, data) { + if (err !== null) { + return reject(err); + } + return resolve(data); + }) + }) + }; +}; + export default { inherits: inherits, _extend: _extend,