javascript-stringify
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -183,2 +183,5 @@ (function (root, stringify) { | ||
'[object Object]': stringifyObject, | ||
'[object Error]': function (error) { | ||
return 'new Error(' + stringify(error.message) + ')'; | ||
}, | ||
'[object Date]': function (date) { | ||
@@ -199,2 +202,12 @@ return 'new Date(' + date.getTime() + ')'; | ||
}, | ||
'[object Set]': function (array, indent, next) { | ||
if (typeof Array.from === 'function') { | ||
return 'new Set(' + stringify(Array.from(array), indent, next) + ')'; | ||
} else return undefined; | ||
}, | ||
'[object Map]': function (array, indent, next) { | ||
if (typeof Array.from === 'function') { | ||
return 'new Map(' + stringify(Array.from(array), indent, next) + ')'; | ||
} else return undefined; | ||
}, | ||
'[object RegExp]': String, | ||
@@ -201,0 +214,0 @@ '[object Function]': String, |
{ | ||
"name": "javascript-stringify", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "Stringify is to `eval` as `JSON.stringify` is to `JSON.parse`", | ||
@@ -5,0 +5,0 @@ "main": "javascript-stringify.js", |
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
16619
342