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

json.decycled

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json.decycled - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

6

index.js

@@ -78,3 +78,3 @@ /* jslint node: true */

return config.regexps!==false?'[Regexp:'+val.toString()+']':val;
} else if(typeof val === 'object' && typeof val.constructor.name === 'string' && val.constructor.name.slice(-5)==='Error'){
} else if(typeof val === 'object' && val.constructor && typeof val.constructor.name === 'string' && val.constructor.name.slice(-5)==='Error'){
var stack = (val.stack || '').split('\n').slice(1);

@@ -90,3 +90,3 @@ var message = (val.message || val.toString());

var copy,i,k,l;
if(typeof val.constructor.name === 'string' && val.constructor.name.slice(-5)==='Array'){
if(val.constructor && typeof val.constructor.name === 'string' && val.constructor.name.slice(-5)==='Array'){
if(parents.length>=config.deep){

@@ -103,3 +103,3 @@ return '[Array:'+val.constructor.name+']';

if(parents.length>=config.deep){
return '[Object:'+(val.constructor.name?val.constructor.name:'Object')+']';
return '[Object:'+(val.constructor && val.constructor.name?val.constructor.name:'Object')+']';
} else {

@@ -106,0 +106,0 @@ copy = {};

{
"name": "json.decycled",
"description": "Decycled versión for JSON.stringify, resolve circulars, Regexp, Errors and dates. Reverse by JSON.revive().",
"version": "2.1.0",
"version": "2.1.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Bifuer",

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