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

ajv

Package Overview
Dependencies
Maintainers
1
Versions
355
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ajv - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

1

lib/compile/index.js

@@ -23,2 +23,3 @@ 'use strict';

schemaPath: '',
path: '""',
RULES: RULES,

@@ -25,0 +26,0 @@ validate: validateGenerator,

2

lib/compile/rules/$ref.dot.js

@@ -5,3 +5,3 @@ {{# def.definitions }}

{{? it.resolveRef($schema) }}
var result{{=$lvl}} = validateRef('{{=$schema}}', {{=$data}}, dataPath{{=$dataLvl}});
var result{{=$lvl}} = validateRef('{{=$schema}}', {{=$data}}, dataPath0 + {{= it.path }});
var {{=$valid}} = result{{=$lvl}}.valid;

@@ -8,0 +8,0 @@ if (!{{=$valid}}) validate.errors.push.apply(validate.errors, result{{=$lvl}}.errors);

@@ -66,3 +66,3 @@ {{## def.setup:keyword:

keyword: '{{=rule}}',
dataPath: dataPath{{=$dataLvl}},
dataPath: {{= it.path }},
message: {{# def._errorMessages[rule] }}

@@ -69,0 +69,0 @@ {{? it.opts.verbose }}, schema: {{# def._errorSchemas[rule] }}, data: {{=$data}}{{?}}

@@ -8,5 +8,5 @@ {{# def.definitions }}

for (var i{{=$lvl}} = {{=startFrom}}; i{{=$lvl}} < {{=$data}}.length; i{{=$lvl}}++) {
var data{{=$dataNxt}} = {{=$data}}[i{{=$lvl}}]
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + '[' + i{{=$lvl}} + ']';
var data{{=$dataNxt}} = {{=$data}}[i{{=$lvl}}];
{{ $it.path = it.path + ' + "[" + i' + $lvl + ' + "]"'; }}
{{= it.validate($it) }};

@@ -44,5 +44,5 @@

var data{{=$dataNxt}} = {{=$data}}[{{= $i }}]
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + '[{{=$i}}]';
var data{{=$dataNxt}} = {{=$data}}[{{= $i }}];
{{ $it.path = it.path + ' + "[' + $i + ']"'; }}
{{= it.validate($it) }}

@@ -49,0 +49,0 @@ }

@@ -68,5 +68,5 @@ {{# def.definitions }}

var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}]
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + property(key{{=$lvl}});
var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}];
{{ $it.path = it.path + ' + property(key' + $lvl + ')'; }}
{{= it.validate($it) }};

@@ -99,3 +99,3 @@

if (data{{=$dataNxt}} !== undefined) {
var dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + "{{=$prop}}";
{{ $it.path = it.path + ' + "' + $prop + '"'; }}
{{= it.validate($it) }};

@@ -124,5 +124,5 @@ }

if (keyMatches{{=$lvl}}) {
var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}]
, dataPath{{=$dataNxt}} = dataPath{{=$dataLvl}} + property(key{{=$lvl}});
var data{{=$dataNxt}} = {{=$data}}[key{{=$lvl}}];
{{ $it.path = it.path + ' + property(key' + $lvl + ')'; }}
{{= it.validate($it) }};

@@ -129,0 +129,0 @@ {{? $breakOnError }} if (!valid{{=$it.level}}) break; {{?}}

{
"name": "ajv",
"version": "0.2.5",
"version": "0.2.6",
"description": "Another JSON schema Validator",

@@ -5,0 +5,0 @@ "main": "lib/ajv.js",

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