json.decycled
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10564