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.7.0 to 1.8.0

2

build/src/main.js

@@ -36,3 +36,3 @@ import{normalizeAggregate}from"./aggregate.js";

const normalizeName=function(error){
if(!isDefinedString(error.name)){
if(error.name!==error.constructor.name){
setErrorProperty(error,"name",error.constructor.name);

@@ -39,0 +39,0 @@ }

{
"name": "normalize-exception",
"version": "1.7.0",
"version": "1.8.0",
"type": "module",

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

@@ -120,2 +120,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 name
<!-- eslint-disable fp/no-delete -->
```js
try {
const error = new TypeError('message')
error.name = 'RangeError'
throw error
} catch (error) {
console.log(error.name) // 'RangeError'
console.log(normalizeException(error).name) // 'TypeError'
}
```
## Missing stack

@@ -122,0 +137,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