@synatic/json-magic
Advanced tools
Comparing version 1.0.1 to 1.0.2
const $check = require('check-types'); | ||
const jsonPointer = require('./JSONPointer.js'); | ||
const serializeError = require('serialize-error'); | ||
@@ -35,4 +36,3 @@ class Magic { | ||
if (ignoreSeparator) | ||
return [path]; | ||
if (ignoreSeparator) return [path]; | ||
return path.split(sep); | ||
@@ -330,2 +330,6 @@ } else { | ||
static fixForMongo(obj) { | ||
if ($check.instanceStrict(obj, Error)) { | ||
obj = serializeError.serializeError(obj); | ||
} | ||
return Magic.renameKey(obj, (key, path) => { | ||
@@ -332,0 +336,0 @@ if (!key) return key; |
{ | ||
"name": "@synatic/json-magic", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Utilities for manipulating JSON objects.", | ||
@@ -45,3 +45,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"check-types": "11.2.2" | ||
"check-types": "11.2.2", | ||
"serialize-error": "8.1.0" | ||
}, | ||
@@ -48,0 +49,0 @@ "devDependencies": { |
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
21325
586
2
+ Addedserialize-error@8.1.0
+ Addedserialize-error@8.1.0(transitive)
+ Addedtype-fest@0.20.2(transitive)