New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0.0 to 3.1.0

6

changelog.md

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

## 3.1.0/2017-10-13
- fix no `required` bug, when pass `null` will check `type`
## 3.0.0/2017-10-13

@@ -8,4 +12,4 @@

- use standard eslint
- add `default` & `requied`
- add `default` & `required`
- rm `ignoreNodeType` option
- change validator function, add `key` and `parent` paramters, return `boolean`

@@ -197,2 +197,7 @@ const helpersFuncs = require('./helpers')

}
} else {
// no required, and value is null, then pass
if (value == null) {
return
}
}

@@ -199,0 +204,0 @@

2

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

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

@@ -261,3 +261,4 @@ const AJS = require('..')

let schema = AJS('requiredSchema', {
name: { type: 'string', required: true }
name: { type: 'string', required: true },
age: { type: 'number' }
})

@@ -264,0 +265,0 @@ assert.deepEqual(schema.validate({ name: 'nswbmw' }), { valid: true, error: null, result: { name: 'nswbmw' } })

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