Socket
Socket
Sign inDemoInstall

modm

Package Overview
Dependencies
95
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.8 to 0.1.9

27

lib/manipulator.js

@@ -24,6 +24,8 @@ // INFO: results of atomic operations are not validated.

maxLength: function (length, value) {
if (value.length) {
return value.length <= length ? true : false;
if (value.length && value.length <= length) {
return [null, value];
}
return ['Validation maxLength failed'];
},

@@ -33,5 +35,7 @@

if (value.length) {
return value.length >= length ? true : false;
if (value.length && value.length >= length) {
return [null, value];
}
return ['Validation minLength failed'];
},

@@ -41,12 +45,15 @@

if (typeof value === 'number') {
return value <= optValue ? true : false;
if (typeof value === 'number' && value <= optValue) {
return [null, value];
}
return ['Validation max failed'];
},
min: function (optValue, value) {
if (typeof value === 'number') {
return value >= optValue ? true : false;
if (typeof value === 'number' && value >= optValue) {
return [null, value];
}
return false;
return ['Validation min failed'];
},

@@ -53,0 +60,0 @@ }

{
"name": "modm",
"version": "0.1.8",
"version": "0.1.9",
"author": "Adrian Ottiker <adrian@ottiker.com>",

@@ -5,0 +5,0 @@ "description": "A MongoDB Object Document Mapper (ODM)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc