universalify
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -23,4 +23,4 @@ 'use strict' | ||
if (typeof cb !== 'function') return fn.apply(this, arguments) | ||
else fn.apply(this, arguments).then(r => cb(null, r)).catch(cb) | ||
else fn.apply(this, arguments).then(r => cb(null, r), cb) | ||
}, 'name', { value: fn.name }) | ||
} |
{ | ||
"name": "universalify", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Make a callback- or promise-based function support both promises and callbacks.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -39,3 +39,3 @@ # universalify | ||
console.log(result) | ||
// -> Hello World! | ||
// -> Hi! | ||
}) | ||
@@ -68,3 +68,3 @@ ``` | ||
console.log(result) | ||
// -> Hello World! | ||
// -> Hi! | ||
}) | ||
@@ -71,0 +71,0 @@ ``` |
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
4426