merge-error-cause
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -17,6 +17,18 @@ import setErrorClass from"set-error-class"; | ||
const shouldMergeClass=function({name,wrap}){ | ||
return name==="Error"||wrap===true; | ||
const shouldMergeClass=function(parent){ | ||
const{wrap,name}=parent; | ||
if(typeof wrap!=="boolean"){ | ||
return name==="Error"; | ||
} | ||
if(isOwn.call(parent,"wrap")){ | ||
delete parent.wrap; | ||
} | ||
return wrap; | ||
}; | ||
const{hasOwnProperty:isOwn}=Object.prototype; | ||
@@ -28,2 +40,3 @@ | ||
const fixName=function(parent,constructorError){ | ||
@@ -30,0 +43,0 @@ if(parent.name!==constructorError.name){ |
{ | ||
"name": "merge-error-cause", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"type": "module", | ||
@@ -56,3 +56,3 @@ "exports": "./build/src/main.js", | ||
"@ehmicky/dev-tasks": "^1.0.86", | ||
"test-each": "^5.3.0" | ||
"test-each": "^5.4.0" | ||
}, | ||
@@ -59,0 +59,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
31880
196