Comparing version 1.3.7 to 1.3.8
@@ -94,12 +94,11 @@ /// <reference path="../nodelib/node.js"/> | ||
// Handle any renames | ||
for(var upstream in $.options.renames) { | ||
var downstream = $.options.renames[upstream]; | ||
for(var upstream in this.options.renames) { | ||
var downstream = this.options.renames[upstream]; | ||
conditions[upstream] = conditions[upstream] || conditions[downstream]; | ||
if(conditions[upstream] === undefined) | ||
delete conditions[upstream]; | ||
if(conditions[downstream] !== undefined) | ||
if(conditions.hasOwnProperty(upstream)) { | ||
if(conditions.hasOwnProperty(downstream)) delete conditions[downstream]; | ||
} else if(conditions.hasOwnProperty(downstream)) { | ||
conditions[upstream] = conditions[downstream]; | ||
delete conditions[downstream]; | ||
} | ||
} | ||
@@ -141,12 +140,11 @@ | ||
// Handle any renames | ||
for(var upstream in $.options.renames) { | ||
var downstream = $.options.renames[upstream]; | ||
for(var upstream in this.options.renames) { | ||
var downstream = this.options.renames[upstream]; | ||
conditions[upstream] = conditions[upstream] || conditions[downstream]; | ||
if(conditions[upstream] === undefined) | ||
delete conditions[upstream]; | ||
if(conditions[downstream] !== undefined) | ||
if(conditions.hasOwnProperty(upstream)) { | ||
if(conditions.hasOwnProperty(downstream)) delete conditions[downstream]; | ||
} else if(conditions.hasOwnProperty(downstream)) { | ||
conditions[upstream] = conditions[downstream]; | ||
delete conditions[downstream]; | ||
} | ||
} | ||
@@ -231,9 +229,8 @@ | ||
obj[upstream] = obj[upstream] || obj[downstream]; | ||
if(obj[upstream] === undefined) | ||
delete obj[upstream]; | ||
if(obj[downstream] !== undefined) | ||
if(obj.hasOwnProperty(upstream)) { | ||
if(obj.hasOwnProperty(downstream)) delete obj[downstream]; | ||
} else if(obj.hasOwnProperty(downstream)) { | ||
obj[upstream] = obj[downstream]; | ||
delete obj[downstream]; | ||
} | ||
} | ||
@@ -280,9 +277,8 @@ | ||
conditions[upstream] = conditions[upstream] || conditions[downstream]; | ||
if(conditions[upstream] === undefined) | ||
delete conditions[upstream]; | ||
if(conditions[downstream] !== undefined) | ||
if(conditions.hasOwnProperty(upstream)) { | ||
if(conditions.hasOwnProperty(downstream)) delete conditions[downstream]; | ||
} else if(conditions.hasOwnProperty(downstream)) { | ||
conditions[upstream] = conditions[downstream]; | ||
delete conditions[downstream]; | ||
} | ||
} | ||
@@ -315,9 +311,8 @@ | ||
conditions[upstream] = conditions[upstream] || conditions[downstream]; | ||
if(conditions[upstream] === undefined) | ||
delete conditions[upstream]; | ||
if(conditions[downstream] !== undefined) | ||
if(conditions.hasOwnProperty(upstream)) { | ||
if(conditions.hasOwnProperty(downstream)) delete conditions[downstream]; | ||
} else if(conditions.hasOwnProperty(downstream)) { | ||
conditions[upstream] = conditions[downstream]; | ||
delete conditions[downstream]; | ||
} | ||
} | ||
@@ -357,9 +352,8 @@ | ||
conditions[upstream] = conditions[upstream] || conditions[downstream]; | ||
if(conditions[upstream] === undefined) | ||
delete conditions[upstream]; | ||
if(conditions[downstream] !== undefined) | ||
if(conditions.hasOwnProperty(upstream)) { | ||
if(conditions.hasOwnProperty(downstream)) delete conditions[downstream]; | ||
} else if(conditions.hasOwnProperty(downstream)) { | ||
conditions[upstream] = conditions[downstream]; | ||
delete conditions[downstream]; | ||
} | ||
} | ||
@@ -366,0 +360,0 @@ |
@@ -20,4 +20,4 @@ var _ = require('lodash'); | ||
var newValue = transforms[k][method](properties[k]); | ||
if(newValue === undefined && properties[k] !== undefined) delete properties[k]; | ||
else if(newValue !== undefined) properties[k] = newValue; | ||
if(newValue === undefined) delete properties[k]; | ||
else properties[k] = newValue; | ||
} else if (transforms[k]) { | ||
@@ -24,0 +24,0 @@ // Have a nested transformation to apply |
{ | ||
"name": "iridium", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"author": "Benjamin Pannell <admin@sierrasoftworks.com>", | ||
@@ -5,0 +5,0 @@ "description": "A custom lightweight ORM for MongoDB designed for power-users", |
@@ -38,3 +38,3 @@ /// <reference path="../nodelib/node.js"/> | ||
model = new Model(db, 'model', { | ||
name: String | ||
name: /.+/ | ||
}, { | ||
@@ -41,0 +41,0 @@ renames: { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
300482
5826