Socket
Socket
Sign inDemoInstall

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.1 to 2.20.2

11

index.js

@@ -113,5 +113,10 @@ var genobj = require('generate-object-property')

var testLimitedRegex = function (r, s, maxLength) {
if (maxLength > -1 && s.length > maxLength) return true
return r.test(s)
}
var compile = function(schema, cache, root, reporter, opts) {
var fmts = opts ? xtend(formats, opts.formats) : formats
var scope = {unique:unique, formats:fmts, isMultipleOf:isMultipleOf}
var scope = {unique:unique, formats:fmts, isMultipleOf:isMultipleOf, testLimitedRegex:testLimitedRegex}
var verbose = opts ? !!opts.verbose : false;

@@ -222,3 +227,3 @@ var greedy = opts && opts.greedy !== undefined ?

if (typeof scope[n] === 'function') validate('if (!%s(%s)) {', n, name)
else validate('if (!%s.test(%s)) {', n, name)
else validate('if (!testLimitedRegex(%s, %s, %d)) {', n, name, typeof node.maxLength === 'undefined' ? -1 : node.maxLength)
error('must be '+node.format+' format')

@@ -397,3 +402,3 @@ validate('}')

if (type !== 'string') validate('if (%s) {', types.string(name))
validate('if (!(%s.test(%s))) {', p, name)
validate('if (!(testLimitedRegex(%s, %s, %d))) {', p, name, typeof node.maxLength === 'undefined' ? -1 : node.maxLength)
error('pattern mismatch')

@@ -400,0 +405,0 @@ validate('}')

{
"name": "is-my-json-valid",
"version": "2.20.1",
"version": "2.20.2",
"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