New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

schema-inspector

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schema-inspector - npm Package Compare versions

Comparing version 1.4.6 to 1.4.7

2

bower.json
{
"name": "schema-inspector",
"version": "1.4.6",
"version": "1.4.7",
"homepage": "https://github.com/Atinux/schema-inspector",

@@ -5,0 +5,0 @@ "authors": [

@@ -387,3 +387,3 @@ /*

var _keys = schema.someKeys;
if (typeof candidat !== 'object') {
if (typeof candidat !== 'object' || candidat === null) {
return;

@@ -390,0 +390,0 @@ }

var inspector = require('../');
var schema = {
type: 'object',
properties: {
lorem: { type: 'string', eq: 'ipsum' },
dolor: {
type: 'array',
items: { type: 'number' }
}
}
};
// var schema = {
// type: 'object',
// properties: {
// lorem: { type: 'string', eq: 'ipsum' },
// dolor: {
// type: 'array',
// items: { type: 'number' }
// }
// }
// };
var candidate = {
lorem: 'not_ipsum',
dolor: [ 12, 34, 'ERROR', 45, 'INVALID' ]
};
var result = inspector.validate(schema, candidate, function (err, result) {
console.log(result.format());
});
// var candidate = {
// lorem: 'not_ipsum',
// dolor: [ 12, 34, 'ERROR', 45, 'INVALID' ]
// };
// var result = inspector.validate(schema, candidate, function (err, result) {
// console.log(result.format());
// });
// var schema = { type: 'object', properties: { lol: { someKeys: ['pouet'] } } };
// var subject = { lol: null };
// inspector.validate(schema, subject);
{
"name": "schema-inspector",
"description": "Schema-Inspector is a powerful tool to sanitize and validate JS objects.",
"version": "1.4.6",
"version": "1.4.7",
"main": "index.js",

@@ -6,0 +6,0 @@ "author": {

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