Skip to content

Commit

Permalink
added close function
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjorgensen committed Feb 23, 2012
1 parent 215db4f commit b03b6e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ Collection.prototype._exec = function(name, args) {
}));
};

Collection.prototype.close = function() {
this.close();
};

Object.keys(mongo.Collection.prototype).forEach(function(name) { // we just wanna proxy any remaining methods on collections
if (!Collection.prototype[name] && typeof mongo.Collection.prototype[name] === 'function') {
Collection.prototype[name] = function() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name":"mongojs",
"description":"a simple mongo module that implements the mongo api",
"keywords": ["mongo", "db", "mongodb"],
"version":"0.2.6",
"version":"0.3.0",
"homepage" : "https://github.com/gett/mongojs",
"author": "Ge.tt <hello@ge.tt>",
"contributors": [
Expand Down

0 comments on commit b03b6e1

Please sign in to comment.