machinepack-json
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -41,4 +41,8 @@ module.exports = { | ||
var util = require('util'); | ||
// Backwards compat for Node v0.10 (which doesn't have `util.is*()` qualifiers) | ||
var isFunction = require('lodash.isfunction'); | ||
var isRegExp = require('lodash.isregexp'); | ||
var isError = require('lodash.iserror'); | ||
/** | ||
@@ -71,9 +75,9 @@ * This was modified by @mikermcneil from @isaacs' json-stringify-safe | ||
// Do some advanced serialization | ||
if (util.isError(value)){ | ||
if (isError(value)){ | ||
value = value.stack; | ||
} | ||
else if (util.isRegExp(value)){ | ||
else if (isRegExp(value)){ | ||
value = value.toString(); | ||
} | ||
else if (util.isFunction(value)){ | ||
else if (isFunction(value)){ | ||
value = value.toString(); | ||
@@ -80,0 +84,0 @@ } |
{ | ||
"name": "machinepack-json", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Encode and decode data to and from JSON.", | ||
@@ -16,2 +16,5 @@ "scripts": { | ||
"dependencies": { | ||
"lodash.iserror": "3.1.1", | ||
"lodash.isfunction": "3.0.8", | ||
"lodash.isregexp": "3.0.5", | ||
"machine": "~12.1.0" | ||
@@ -18,0 +21,0 @@ }, |
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
13556
434
4
+ Addedlodash.iserror@3.1.1
+ Addedlodash.isfunction@3.0.8
+ Addedlodash.isregexp@3.0.5
+ Addedlodash.iserror@3.1.1(transitive)
+ Addedlodash.isfunction@3.0.8(transitive)
+ Addedlodash.isregexp@3.0.5(transitive)