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

mongo-schema

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-schema - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

test/test.js

11

lib/mongo-schema.js

@@ -1,3 +0,1 @@

var has_require = typeof require !== 'undefined';
var MongoSchema = function () {

@@ -35,2 +33,3 @@ var self = this;

if (!schema.hasOwnProperty(key)) continue;
var value = data[key];

@@ -40,3 +39,3 @@ var properties = schema[key];

if (!isArray(value)) {
delete data[key];
data[key] = [];
continue;

@@ -50,4 +49,6 @@ } else {

} else if (isObject(properties) && !isNull(properties) && !isDefObject(properties) && !normalizeType(properties)) {
var errs = self.check(value, properties);
errors = errors.concat(errs);
if(!isUndefined(value)){
var errs = self.check(value, properties);
errors = errors.concat(errs);
}
} else {

@@ -54,0 +55,0 @@ var type;

{
"name": "mongo-schema",
"version": "0.1.2",
"version": "0.1.3",
"main": "lib/mongo-schema.js",

@@ -5,0 +5,0 @@ "description": "Basic schema for mongodb",

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