mongo-control
Advanced tools
Comparing version 1.0.53 to 1.0.54
@@ -555,2 +555,3 @@ var MongoClient = require('mongodb').MongoClient | ||
var objId | ||
var unset = {} | ||
@@ -576,6 +577,11 @@ if (reMongoId.test(params.id)) { | ||
if (reJsStrData.test(item)) params.update[key] = new Date(item) | ||
else if(item === '') { | ||
unset[key] = '' | ||
delete params.update[key] | ||
} | ||
} | ||
var updObj = { | ||
'$set': params.update | ||
'$set': params.update, | ||
'$unset': unset | ||
} | ||
@@ -582,0 +588,0 @@ |
{ | ||
"name": "mongo-control", | ||
"version": "1.0.53", | ||
"version": "1.0.54", | ||
"description": "Simple functions to control mongo", | ||
@@ -5,0 +5,0 @@ "main": "mongo.control.js", |
24443
777