loud-rejection
Advanced tools
Comparing version 1.2.0 to 1.2.1
'use strict'; | ||
var arrayFindIndex = require('array-find-index'); | ||
@@ -13,5 +14,5 @@ // WARNING: This undocumented API is subject to change. | ||
process.on('rejectionHandled', function (p) { | ||
var index = unhandledRejections.reduce(function (result, item, idx) { | ||
return (item.promise === p ? idx : result); | ||
}, -1); | ||
var index = arrayFindIndex(unhandledRejections, function (x) { | ||
return x.promise === p; | ||
}); | ||
@@ -18,0 +19,0 @@ unhandledRejections.splice(index, 1); |
@@ -18,3 +18,2 @@ 'use strict'; | ||
if (installed) { | ||
console.trace('WARN: loud rejection called more than once'); | ||
return; | ||
@@ -21,0 +20,0 @@ } |
{ | ||
"name": "loud-rejection", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Make unhandled promise rejections fail loudly instead of the default silent fail", | ||
@@ -41,2 +41,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"array-find-index": "^1.0.0", | ||
"signal-exit": "^2.1.2" | ||
@@ -50,15 +51,8 @@ }, | ||
"get-stream": "^1.0.0", | ||
"nyc": "^3.2.2", | ||
"nyc": "^5.0.1", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"ignores": [ | ||
"test.js" | ||
] | ||
}, | ||
"config": { | ||
"nyc": { | ||
"exclude": [ | ||
"node_modules", | ||
"test.js", | ||
"fixture.js" | ||
@@ -65,0 +59,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
5209
2
+ Addedarray-find-index@^1.0.0
+ Addedarray-find-index@1.0.2(transitive)