grab-mongo-collections

0.0.2 • Public • Published

grab-mongo-collections

A simple functions to get some MongoDB collections.

gmc = require("grab-mongo-collections");
gmc(source, names, callback)

Where

  • source is either a Mongo URL, a Db object (from the driver) or a Collection.
  • names is an array of collections names
  • callback is a function getting error, collections args, 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].

Readme

Keywords

Package Sidebar

Install

npm i grab-mongo-collections

Weekly Downloads

88

Version

0.0.2

License

MIT

Last publish

Collaborators

  • nucky