is-my-json-valid
Advanced tools
Comparing version 2.0.0 to 2.0.1
12
index.js
@@ -20,2 +20,14 @@ var genobj = require('generate-object-property') | ||
if (/^https?:\/\//.test(ptr)) return null | ||
var visit = function(sub) { | ||
if (sub && sub.id === ptr) return sub | ||
if (typeof sub !== 'object' || !sub) return null | ||
return Object.keys(sub).reduce(function(res, k) { | ||
return res || visit(sub[k]) | ||
}, null) | ||
} | ||
var res = visit(obj) | ||
if (res) return res | ||
ptr = ptr.replace(/^#/, '') | ||
@@ -22,0 +34,0 @@ ptr = ptr.replace(/\/$/, '') |
{ | ||
"name": "is-my-json-valid", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A JSONSchema validator that uses code generation to be extremely fast", | ||
@@ -5,0 +5,0 @@ "main": "index.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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
83787
2703
0