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.3 to 1.4.4

2

lib/schema-inspector.js

@@ -1172,3 +1172,3 @@ /*

if (i in schema && typeof this._custom[i] === 'function') {
post = this._custom[i].call(this, schema, candidate);
post = this._custom[i].call(this, schema, post);
}

@@ -1175,0 +1175,0 @@ }, this);

{
"name": "schema-inspector",
"description": "Schema-Inspector is a powerful tool to sanitize and validate JS objects.",
"version": "1.4.3",
"version": "1.4.4",
"main": "./lib/schema-inspector.js",

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

@@ -1183,16 +1183,13 @@ var should = require('should');

var custom = {
superiorMod: function (schema, post, callback) {
superiorMod: function (schema, post) {
var spm = schema.$superiorMod;
if (typeof spm !== 'number' || typeof post !== 'number') {
callback();
return post;
}
var self = this;
process.nextTick(function () {
var mod = post % spm;
if (mod !== 0) {
self.report();
return callback(null, post + spm - mod);
}
callback(null, post);
});
var mod = post % spm;
if (mod !== 0) {
this.report();
return (post + spm - mod);
}
return post;
}

@@ -1208,9 +1205,7 @@ };

si.sanitize(schema, candidate, function (err, result) {
should.not.exist(err);
result.should.be.an.Object;
result.should.have.property('reporting').with.be.an.instanceof(Array)
.and.be.lengthOf(0);
done();
});
var result = si.sanitize(schema, candidate);
result.should.be.an.Object;
result.should.have.property('reporting').with.be.an.instanceof(Array)
.and.be.lengthOf(0);
done();
});

@@ -1223,11 +1218,9 @@

si.sanitize(schema, candidate, function (err, result) {
should.not.exist(err);
result.should.be.an.Object;
result.should.have.property('reporting').with.be.an.instanceof(Array)
.and.be.lengthOf(1);
result.reporting[0].property.should.be.equal('@.lorem');
candidate.lorem.should.equal(10);
done();
});
var result = si.sanitize(schema, candidate);
result.should.be.an.Object;
result.should.have.property('reporting').with.be.an.instanceof(Array)
.and.be.lengthOf(1);
result.reporting[0].property.should.be.equal('@.lorem');
candidate.lorem.should.equal(10);
done();
});

@@ -1234,0 +1227,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