json-schema-compare
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "json-schema-compare", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Compare json schemas smarter.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -29,3 +29,5 @@ # json-schema-compare [![Build Status](https://travis-ci.org/mokkabonna/json-schema-compare.svg?branch=master)](https://travis-ci.org/mokkabonna/json-schema-compare) [![Coverage Status](https://coveralls.io/repos/github/mokkabonna/json-schema-compare/badge.svg?branch=master)](https://coveralls.io/github/mokkabonna/json-schema-compare?branch=master) | ||
properties: { | ||
name: true | ||
name: { | ||
minLength: 0 | ||
} | ||
} | ||
@@ -41,3 +43,3 @@ }, { | ||
- Ignores sort for arrays that sort does not matter, like required, enum, type, anyOf, oneOf, anyOf, dependencies (if array) | ||
- Ignores sort for arrays where sort does not matter, like required, enum, type, anyOf, oneOf, anyOf, dependencies (if array) | ||
- Compares correctly type when array or string | ||
@@ -44,0 +46,0 @@ - Ignores duplicate values before comparing |
@@ -107,3 +107,5 @@ var isEqual = require('lodash/isEqual') | ||
function compare(a, b, options) { | ||
options = defaults(options, {ignore: []}) | ||
options = defaults(options, { | ||
ignore: [] | ||
}) | ||
@@ -129,2 +131,6 @@ if (emptySchema(a) && emptySchema(b)) { | ||
if ((undef(a) && !undef(b)) || (!undef(a) && undef(b))) { | ||
return false | ||
} | ||
var allKeys = uniq(Object.keys(a).concat(Object.keys(b))) | ||
@@ -131,0 +137,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17918
566
64