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

serialize-error

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialize-error - npm Package Compare versions

Comparing version 11.0.1 to 11.0.2

9

index.js

@@ -113,3 +113,7 @@ import errorConstructors from './error-constructors.js';

if (!value || typeof value !== 'object') {
to[key] = value;
// Gracefully handle non-configurable errors like `DOMException`.
try {
to[key] = value;
} catch {}
continue;

@@ -163,3 +167,4 @@ }

// `JSON.stringify()` discards functions. We do too, unless a function is thrown directly.
return `[Function: ${value.name ?? 'anonymous'}]`;
// We intentionally use `||` because `.name` is an empty string for anonymous functions.
return `[Function: ${value.name || 'anonymous'}]`;
}

@@ -166,0 +171,0 @@

{
"name": "serialize-error",
"version": "11.0.1",
"version": "11.0.2",
"description": "Serialize/deserialize an error into a plain object",

@@ -5,0 +5,0 @@ "license": "MIT",

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