@gar/promisify
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -11,7 +11,9 @@ 'use strict' | ||
if (target[prop][promisify.custom]) { | ||
return target[prop][promisify.custom] | ||
return function () { | ||
return Reflect.get(target, prop, receiver)[promisify.custom].apply(receiver, arguments) | ||
} | ||
} | ||
return function () { | ||
return new Promise((resolve, reject) => { | ||
Reflect.get(target, prop, receiver).apply(target, [...arguments, function (err, result) { | ||
Reflect.get(target, prop, receiver).apply(receiver, [...arguments, function (err, result) { | ||
if (err) { | ||
@@ -18,0 +20,0 @@ return reject(err) |
{ | ||
"name": "@gar/promisify", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Promisify an entire class or object", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3107
33