Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

p-odm

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-odm - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

1

lib/index.js

@@ -38,3 +38,2 @@ 'use strict';

var schema = new Environment();
//var schema = new Validator();

@@ -41,0 +40,0 @@ // lazy connector

37

lib/model.js

@@ -523,2 +523,8 @@ 'use strict';

/**
* Verifies if an Object is valid against the configured validator
*
* @param {Boolean} [verbose]
* @return {Boolean|Object}
*/
Model.prototype.validate = function (verbose) {

@@ -546,2 +552,11 @@ if (hasSchema) {

/**
* Helper to have a short syntax
*
* @return {Boolean}
*/
Model.prototype.isValid = function () {
return this.validate();
};
/**
* Save this object instance to the backend mongodb instance.

@@ -617,12 +632,16 @@ *

if (setPath) {
var path = setPath.split('.');
var i, len;
var result = self;
for (i = 0, len = path.length; i < len; i++) {
result = result[path[i]];
if (typeof setPath === 'string') {
var path = setPath.split('.');
var i, len;
var result = self;
for (i = 0, len = path.length; i < len; i++) {
result = result[path[i]];
}
if (partUpdate.$set === undefined || partUpdate.$set === null) {
partUpdate.$set = {};
}
partUpdate.$set[setPath] = result;
} else {
return callback('$setpath only accepts a String path');
}
if (partUpdate.$set === undefined || partUpdate.$set === null) {
partUpdate.$set = {};
}
partUpdate.$set[setPath] = result;
}

@@ -629,0 +648,0 @@ }

@@ -8,3 +8,3 @@ {

],
"version": "3.0.0",
"version": "3.0.1",
"engines": {

@@ -14,3 +14,3 @@ "node": ">=0.4.12"

"dependencies": {
"mongodb": ">=1.0.2",
"mongodb": "1.0.2",
"jsonschema": ">= 0.0.3"

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