Is it possible to execute a function in Mongo that accepts any parameters?
- by joshua.clayton
I'm looking to write a function to do a custom query on a collection in Mongo. Problem is, I want to reuse that function. My thought was this (obviously contrived):
var awesome = function(count) {
return function() {
return this.size == parseInt(count);
};
}
So then I could do something along the lines of:
…