Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

normalize-exception

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normalize-exception - npm Package Compare versions

Comparing version 1.8.0 to 1.9.0

5

build/src/cause.js

@@ -9,2 +9,7 @@ import{setErrorProperty}from"./descriptors.js";

export const normalizeCause=function(error,recurse){

@@ -11,0 +16,0 @@ if(!("cause"in error)){

3

build/src/create/main.js

@@ -75,5 +75,6 @@ import isPlainObj from"is-plain-obj";

typeof error.constructor.name!=="string"||
error.constructor.name==="");
error.constructor.name===""||
error.constructor.prototype!==Object.getPrototypeOf(error));
};
//# sourceMappingURL=main.js.map
{
"name": "normalize-exception",
"version": "1.8.0",
"version": "1.9.0",
"type": "module",

@@ -5,0 +5,0 @@ "exports": "./build/src/main.js",

@@ -135,2 +135,17 @@ [![Codecov](https://img.shields.io/codecov/c/github/ehmicky/normalize-exception.svg?label=tested&logo=codecov)](https://codecov.io/gh/ehmicky/normalize-exception)

## Mismatched constructor
<!-- eslint-disable fp/no-delete -->
```js
try {
const error = new TypeError('message')
error.constructor = RangeError
throw error
} catch (error) {
console.log(error.constructor) // RangeError
console.log(normalizeException(error).constructor) // TypeError
}
```
## Missing stack

@@ -137,0 +152,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc