Skip to content

Adds `Collection` helper to all documents in all collections.

License

Notifications You must be signed in to change notification settings

meteor-shuttler/collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collection

Namespace of collectios and getting collection from documents.

Install

meteor add shuttler:collection

Example

var b = new Mongo.Collection('a');
b.insert({ _id: 'c' });
var c = b.findOne('c');
c.Collection() == b; // true
var d = new Mongo.Collection(null, { ref: 'd' });
d._ref == 'd'; // true
Shuttler.collection('d') == d; // true
Shuttler.collections();
// [b, d]

Documentation

Shuttler.collection

(condition: String|Function) => Mongo.Collection|undefined

new Mongo.Collection('e');
Shuttler.collection('e') == e; // true
Shuttler.collection(function(collection) { return collection._name == 'e'; }) == e; // true

Shuttler.collections

() => [Mongo.Collection]

Versions

0.0.6

  • Fix lodash dependence

About

Adds `Collection` helper to all documents in all collections.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published