is-my-json-valid
Advanced tools
Comparing version 2.20.4 to 2.20.5
@@ -16,3 +16,3 @@ var createIpValidator = require('is-my-ip-valid') | ||
exports['ipv6'] = createIpValidator({ version: 6 }) | ||
exports['uri'] = /^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/ | ||
exports['uri'] = /^[a-zA-Z][a-zA-Z0-9+\-.]*:[^\s]*$/ | ||
exports['color'] = /(#?([0-9A-Fa-f]{3,6})\b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\))/ | ||
@@ -19,0 +19,0 @@ exports['hostname'] = function (input) { |
@@ -246,2 +246,4 @@ var genobj = require('generate-object-property') | ||
if (Array.isArray(node.required)) { | ||
var n = gensym('missing') | ||
validate('var %s = 0', n) | ||
var checkRequired = function (req) { | ||
@@ -251,11 +253,10 @@ var prop = genobj(name, req); | ||
error('is required', prop) | ||
validate('missing++') | ||
validate('%s++', n) | ||
validate('}') | ||
} | ||
validate('if ((%s)) {', type !== 'object' ? types.object(name) : 'true') | ||
validate('var missing = 0') | ||
node.required.map(checkRequired) | ||
validate('}'); | ||
if (!greedy) { | ||
validate('if (missing === 0) {') | ||
validate('if (%s === 0) {', n) | ||
indent++ | ||
@@ -262,0 +263,0 @@ } |
{ | ||
"name": "is-my-json-valid", | ||
"version": "2.20.4", | ||
"version": "2.20.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "mafintosh/is-my-json-valid", |
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
40182
676