universalify
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -8,5 +8,6 @@ 'use strict' | ||
return new Promise((resolve, reject) => { | ||
fn.apply( | ||
fn.call( | ||
this, | ||
args.concat([(err, res) => err ? reject(err) : resolve(res)]) | ||
...args, | ||
(err, res) => (err != null) ? reject(err) : resolve(res) | ||
) | ||
@@ -13,0 +14,0 @@ }) |
{ | ||
"name": "universalify", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Make a callback- or promise-based function support both promises and callbacks.", | ||
@@ -29,3 +29,3 @@ "keywords": [ | ||
"standard": "^14.3.1", | ||
"tape": "^4.6.3" | ||
"tape": "^5.0.1" | ||
}, | ||
@@ -32,0 +32,0 @@ "engines": { |
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
4639
22