is-my-json-valid
Advanced tools
+1
-1
@@ -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) { |
+4
-3
@@ -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 @@ } |
+1
-1
| { | ||
| "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", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
40182
0.07%676
0.15%