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.6.6 to 0.6.7

spec/tests/issues/20_failing_to_parse_schema.json

9

lib/compile/util.js

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

getProperty: getProperty,
escapeQuotes: escapeQuotes,
escapeRegExp: escapeRegExp,

@@ -85,9 +86,15 @@ ucs2length: ucs2length,

var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
var SINGLE_QUOTE = /('|\\)/g;
function getProperty(key) {
return IDENTIFIER.test(key)
? '.' + key
: "['" + key.replace(/'/g, "\\'") + "']";
: "['" + key.replace(SINGLE_QUOTE, "\\$1") + "']";
}
function escapeQuotes(str) {
return str.replace(SINGLE_QUOTE, "\\$1");
}
var ESCAPE_REGEXP = /[\/]/g

@@ -94,0 +101,0 @@ function escapeRegExp(str) {

6

lib/dotjs/required.js

@@ -30,3 +30,3 @@ 'use strict';

var $prop = it.util.getProperty($property);
out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = \'' + ($prop) + '\') ) ';
out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = \'' + (it.util.escapeQuotes($prop)) + '\') ) ';
}

@@ -83,4 +83,4 @@ }

var $prop = it.util.getProperty($property),
$missingProperty = $prop;
it.errorPath = ($currentErrorPath + ' + "' + $prop + '"').replace('" + "', '');
$missingProperty = it.util.escapeQuotes($prop);
it.errorPath = ($currentErrorPath + ' + \'' + $missingProperty + '\'').replace('" + "', '');
out += ' if (' + ($data) + ($prop) + ' === undefined) { ';

@@ -87,0 +87,0 @@ if (it.wasTop && $breakOnError) {

{
"name": "ajv",
"version": "0.6.6",
"version": "0.6.7",
"description": "Another JSON Schema Validator",

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

@@ -197,2 +197,3 @@ # ajv - Another JSON Schema Validator

```
npm install
git submodule update --init

@@ -211,3 +212,3 @@ npm test

`bin/git-hook` to install symbolic link to pre-commit hook that will compile templates and run tests when you commit.
`bin/git-hook` to install symbolic link to pre-commit hook that will compile templates and run tests.

@@ -214,0 +215,0 @@

@@ -66,3 +66,3 @@ [

{
"description": "valid",
"description": "invalid",
"data": [

@@ -69,0 +69,0 @@ {

Sorry, the diff of this file is not supported yet

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