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 2.3.2 to 2.4.0

4

build/src/main.d.ts

@@ -21,3 +21,3 @@ /**

type NormalizedError<ErrorArg, OptionsArg extends Options> = Error &
type NormalizedError<ErrorArg> = Error &
(ErrorArg extends Error

@@ -79,2 +79,2 @@ ? {

options?: Options,
): NormalizedError<ErrorArg, Options>
): NormalizedError<ErrorArg>

@@ -40,6 +40,16 @@ import{normalizeAggregate}from"./aggregate.js";

const normalizeName=function(error){
if(error.name!==error.constructor.name){
setErrorProperty(error,"name",error.constructor.name);
if(isDefinedString(error.name)){
return;
}
const prototypeName=Object.getPrototypeOf(error).name;
const name=isDefinedString(prototypeName)?
prototypeName:
error.constructor.name;
setErrorProperty(error,"name",name);
};

@@ -46,0 +56,0 @@

{
"name": "normalize-exception",
"version": "2.3.2",
"version": "2.4.0",
"type": "module",

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

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