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

json-schema-compare

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-compare - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"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 @@

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