Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-my-json-valid

Package Overview
Dependencies
Maintainers
7
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-my-json-valid - npm Package Compare versions

Comparing version 2.20.4 to 2.20.5

2

formats.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc