Socket
Socket
Sign inDemoInstall

jsonschema

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonschema - npm Package Compare versions

Comparing version 1.2.8 to 1.2.9

19

lib/attribute.js

@@ -263,4 +263,10 @@ 'use strict';

for (var pattern in patternProperties) {
var expr = new RegExp(pattern, 'u');
if (!expr.test(property)) {
try {
var regexp = new RegExp(pattern, 'u');
} catch(_e) {
// In the event the stricter handling causes an error, fall back on the forgiving handling
// DEPRECATED
regexp = new RegExp(pattern);
}
if (!regexp.test(property)) {
continue;

@@ -522,3 +528,10 @@ }

var result = new ValidatorResult(instance, schema, options, ctx);
var regexp = new RegExp(schema.pattern, 'u');
var pattern = schema.pattern;
try {
var regexp = new RegExp(pattern, 'u');
} catch(_e) {
// In the event the stricter handling causes an error, fall back on the forgiving handling
// DEPRECATED
regexp = new RegExp(pattern);
}
if (!instance.match(regexp)) {

@@ -525,0 +538,0 @@ result.addError({

@@ -98,2 +98,3 @@ /*

allowUnknownAttributes?: boolean;
preValidateProperty?: function;
rewrite?: RewriteFunction;

@@ -110,2 +111,6 @@ propertyName?: string;

export interface preValidatePropertyFunction {
(instance: any, key: string, schema: Schema, options: Options, ctx: SchemaContext): any;
}
export interface SchemaContext {

@@ -112,0 +117,0 @@ schema: Schema;

2

package.json
{
"author": "Tom de Grunt <tom@degrunt.nl>",
"name": "jsonschema",
"version": "1.2.8",
"version": "1.2.9",
"license": "MIT",

@@ -6,0 +6,0 @@ "dependencies": {},

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