Comparing version 3.0.0 to 3.0.1
@@ -38,3 +38,2 @@ 'use strict'; | ||
var schema = new Environment(); | ||
//var schema = new Validator(); | ||
@@ -41,0 +40,0 @@ // lazy connector |
@@ -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 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
42872
1330
0
+ Addedbson@0.0.6(transitive)
+ Addedmongodb@1.0.2(transitive)
- Removed@mongodb-js/saslprep@1.1.9(transitive)
- Removed@types/webidl-conversions@7.0.3(transitive)
- Removed@types/whatwg-url@11.0.5(transitive)
- Removedbson@6.10.0(transitive)
- Removedmemory-pager@1.5.0(transitive)
- Removedmongodb@6.11.0(transitive)
- Removedmongodb-connection-string-url@3.0.1(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedsparse-bitfield@3.0.3(transitive)
- Removedtr46@4.1.1(transitive)
- Removedwebidl-conversions@7.0.0(transitive)
- Removedwhatwg-url@13.0.0(transitive)
Updatedmongodb@1.0.2