New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

error-serializer

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-serializer - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

build/src/options.js

23

build/src/main.js
import isErrorInstance from"is-error-instance";
import normalizeException from"normalize-exception";
import{normalizeOptions,validateOptions}from"./options.js";
import{parseDeep,parseShallow}from"./parse/main.js";
import{serializeDeep,serializeShallow}from"./serialize.js";
export{validateOptions};

@@ -14,6 +16,6 @@

export const serialize=function(
value,
{normalize=false,shallow=false,beforeSerialize,afterSerialize}={})
{
export const serialize=function(value,options){
const{normalize,shallow,beforeSerialize,afterSerialize}=
normalizeOptions(options);
const valueA=applyNormalize(value,normalize);

@@ -32,12 +34,5 @@ const events={beforeSerialize,afterSerialize};

export const parse=function(
value,
{
normalize=false,
shallow=false,
beforeParse,
afterParse,
classes={}}=
{})
{
export const parse=function(value,options){
const{normalize,shallow,beforeParse,afterParse,classes}=
normalizeOptions(options);
const events={beforeParse,afterParse};

@@ -44,0 +39,0 @@ const valueA=shallow?

@@ -22,3 +22,3 @@ import setErrorClass from"set-error-class";

const getErrorClass=function(name,classes){
if(typeof classes[name]==="function"){
if(classes[name]!==undefined){
return classes[name];

@@ -25,0 +25,0 @@ }

{
"name": "error-serializer",
"version": "4.1.0",
"version": "4.2.0",
"type": "module",

@@ -5,0 +5,0 @@ "exports": {

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