collection.find

Anywhere collection.find([selector], [options]) Source Find the documents in a collection that match the selector. Arguments selector Mongo Selector, Object ID, or String A query describing the documents to find Options sort Mongo Sort Specifier Sort order (default: natural order) skip Number Number of results to skip at the beginning limit Number Maximum number of results to return fields Mongo Field Specifier Dictionary of fields to return or exclude. reactive B

collection.allow

Server collection.allow(options) Source Allow users to write directly to this collection from client code, subject to limitations you define. Options insert, update, remove Function Functions that look at a proposed modification to the database and return true if it should be allowed. fetch Array of Strings Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions. transform Function Overrides

collection.deny

Server collection.deny(options) Source Override allow rules. Options insert, update, remove Function Functions that look at a proposed modification to the database and return true if it should be denied, even if an allow rule says otherwise. fetch Array of Strings Optional performance enhancement. Limits the fields that will be fetched from the database for inspection by your update and remove functions. transform Function Overrides transform on the Collection. Pass null to d

coffeescript

coffeescript CoffeeScript is a little language that compiles into JavaScript. It provides a simple syntax without lots of braces and parentheses. The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. CoffeeScript is supported on both the client and the server. Files ending with .coffee, .litcoffee, or .coffee.md are automatically compiled to JavaScript.

Code style

After reading this article, you’ll know: Why it’s a good idea to have consistent code style Which style guide we recommend for JavaScript code How to set up ESLint to check code style automatically Style suggestions for Meteor-specific patterns, such as Methods, publications, and more Benefits of consistent style Countless hours have been spent by developers throughout the years arguing over single vs. double quotes, where to put brackets, how many spaces to type, and all kinds of other cosme

Change log

2016/04/16: Switch order of Code Style and Application structure sections. PR #383 2016/04/16: Added Writing Packages - Creating an npm package and Using Packages - Overriding packages - npm. PR #381 2016/04/07: Add more examples and details on application structure using imports. PR #356 2016/04/04: Add more content on writing and publishing Atmosphere packages. PR #339 2016/04/03: Add back in build tool default loading order rules. PR #340 2016/04/01: Added CoffeeScript exports syntax. P

check

Anywhere check(value, pattern) import { check } from 'meteor/check' Source Check that a value matches a pattern. If the value does not match the pattern, throw a Match.Error. Particularly useful to assert that arguments to a function have the right types and structure. Arguments value Any The value to check pattern Match Pattern The pattern to match value against

Build system

The Meteor build system is the actual command line tool that you get when you install Meteor. You run it by typing the meteor command in your terminal, possibly followed by a set of arguments. Read the docs about the command line tool or type meteor help in your terminal to learn about all of the commands. What does it do? The Meteor build tool is what compiles, runs, deploys, and publishes all of your Meteor apps and packages. It’s Meteor’s built-in solution to the problems also solved by tool

Blaze.With

Client Blaze.With(data, contentFunc) import { Blaze } from 'meteor/blaze' Source Constructs a View that renders content with a data context. Arguments data Object or Function An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run. contentFunc Function A Function that returns renderable content.

Blaze.toHTMLWithData

Client Blaze.toHTMLWithData(templateOrView, data) import { Blaze } from 'meteor/blaze' Source Renders a template or View to HTML with a data context. Otherwise identical to Blaze.toHTML. Arguments templateOrView Blaze.Template or Blaze.View The template (e.g. Template.myTemplate) or View object from which to generate HTML. data Object or Function The data context to use, or a function returning a data context.