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

another-json-schema

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

another-json-schema - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

4

changelog.md

@@ -0,1 +1,5 @@

## 3.2.0/2017-11-14
- fix schema `required: false` bug
## 3.1.0/2017-10-13

@@ -2,0 +6,0 @@

2

helpers.js

@@ -55,3 +55,3 @@ const toString = Object.prototype.toString

exports.required = function (actual, expected, key, parent) {
return expected ? (!!actual === true) : true
return !!actual === true
}

@@ -188,3 +188,3 @@ const helpersFuncs = require('./helpers')

// second, check required
if ('required' in ctx._children) {
if (ctx._children.required) {
if (opts.required == null || opts.required) {

@@ -191,0 +191,0 @@ valid = helpersFuncs.required.call(ctx, value, ctx._children.required, key, parent)

{
"name": "another-json-schema",
"version": "3.1.0",
"version": "3.2.0",
"description": "Another JSON Schema, simple & flexible & intuitive.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -282,2 +282,3 @@ const AJS = require('..')

assert.deepEqual(schema.validate(''), { valid: true, error: null, result: '' })
assert.deepEqual(schema.validate(), { valid: true, error: null, result: undefined })
})

@@ -284,0 +285,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