a-wait-forit
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -17,5 +17,5 @@ "use strict"; | ||
exports.forit = (maybePromise, onerror) => { | ||
const onError = onerror || (_ => [_]); | ||
const onError = onerror || (_ => [_, undefined]); | ||
return (typeof maybePromise === 'function' ? maybePromise() : maybePromise).then(_ => [undefined, _]).catch(onerror); | ||
return (typeof maybePromise === 'function' ? maybePromise() : maybePromise).then(_ => [undefined, _]).catch(onError); | ||
}; |
{ | ||
"name": "a-wait-forit", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Async/await without try/catch", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
3857