0.0.2 • Published 11 years ago
grab-mongo-collections v0.0.2
grab-mongo-collections
A simple functions to get some MongoDB collections.
gmc = require("grab-mongo-collections");
gmc(source, names, callback)Where
sourceis either a Mongo URL, a Db object (from the driver) or a Collection.namesis an array of collections namescallbackis a function gettingerror, collectionsargs, with collections being an array containing required collections.
If source is a collection and names length 1, the function just calls back with null, [source].