@synatic/json-magic
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -176,3 +176,13 @@ 'use strict'; | ||
const type = Object.prototype.toString.call(value); | ||
return type === '[object Object]' || type === '[object Array]'; | ||
if (type === '[object Object]') { | ||
// descend if the value is not a BSONValue | ||
// todo: this should rather be (value instanceof BSONValue) if we didn't have to support node 12 | ||
if (!!value._bsontype && !!value[Symbol.for('@@mdb.bson.version')]) { | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
} else { | ||
return type === '[object Array]'; | ||
} | ||
}; | ||
@@ -179,0 +189,0 @@ |
{ | ||
"name": "@synatic/json-magic", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Utilities for manipulating JSON objects.", | ||
@@ -22,3 +22,4 @@ "main": "index.js", | ||
"keywords": [ | ||
"json" | ||
"json", | ||
"bson" | ||
], | ||
@@ -46,6 +47,7 @@ "author": { | ||
"dependencies": { | ||
"check-types": "11.2.2", | ||
"check-types": "11.2.3", | ||
"serialize-error": "8.1.0" | ||
}, | ||
"devDependencies": { | ||
"bson": "^6.8.0", | ||
"eslint": "^8.16.0", | ||
@@ -55,5 +57,5 @@ "eslint-config-google": "^0.14.0", | ||
"mocha": "^10.0.0", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.6.2" | ||
"nyc": "^17.0.0", | ||
"prettier": "^3.3.3" | ||
} | ||
} |
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
21782
596
7
+ Addedcheck-types@11.2.3(transitive)
- Removedcheck-types@11.2.2(transitive)
Updatedcheck-types@11.2.3