Skip to content

Commit

Permalink
Bah, method overloading.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jul 18, 2011
1 parent 516c60d commit 8056141
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mongo-mock/collection.js
Expand Up @@ -6,7 +6,8 @@ module.exports = collection;
function collection(id, options) {
var collection = [];

function find(query, options, callback) {
function find(query, fields, options, callback) {
if (arguments.length < 4) { callback = options; options = fields; } else { options.fields = fields; }
if (typeof options === "function") { callback = options; options = null; }
var objects = collection.filter(filter(query));
if (options) {
Expand Down

0 comments on commit 8056141

Please sign in to comment.