Comparing version 0.1.12 to 0.1.13
0.1.13 / 2012-05-28 | ||
=================== | ||
* Fixed string-based field selection. | ||
0.1.12 / 2012-05-25 | ||
@@ -3,0 +8,0 @@ =================== |
@@ -55,3 +55,4 @@ | ||
Collection.prototype.opts = function (opts) { | ||
opts = opts || {}; | ||
opts = util.options(opts || {}); | ||
for (var i in this.manager.options) { | ||
@@ -62,2 +63,3 @@ if (!(i in opts) && !(i in this.options)) { | ||
} | ||
for (var i in this.options) { | ||
@@ -68,3 +70,4 @@ if (!(i in opts)) { | ||
} | ||
return util.options(opts); | ||
return opts; | ||
}; | ||
@@ -71,0 +74,0 @@ |
{ | ||
"name": "monk" | ||
, "version": "0.1.12" | ||
, "version": "0.1.13" | ||
, "main": "lib/monk.js" | ||
@@ -5,0 +5,0 @@ , "tags": ["mongodb", "mongo", "driver"] |
@@ -113,2 +113,15 @@ | ||
}); | ||
it('should only provide selected fields', function (done) { | ||
users.insert({ a: 'b', c: 'd', e: 'f' }, function (err, doc) { | ||
expect(err).to.be(null); | ||
users.findOne(doc._id, 'a e', function (err, doc) { | ||
expect(err).to.be(null); | ||
expect(doc.a).to.be('b'); | ||
expect(doc.e).to.be('f'); | ||
expect(doc.c).to.be(undefined); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
@@ -115,0 +128,0 @@ |
32089
930