EJSON.clone

Anywhere EJSON.clone(val) import { EJSON } from 'meteor/ejson' Source Return a deep copy of val. Arguments val EJSON-able Object A value to copy.

Selectors

Mongo-Style Selectors The simplest selectors are just a string or Mongo.ObjectID. These selectors match the document with that value in its _id field. A slightly more complex form of selector is an object containing a set of keys that must match in a document: // Matches all documents where deleted is false {deleted: false} // Matches all documents where the name and cognomen are as given {name: "Rhialto", cognomen: "the Marvelous"} // Matches every document {} But they can also contain mo

meteor publish

meteor publish Publishes your package. To publish, you must cd into the package directory, log in with your Meteor Developer Account and run meteor publish. By convention, published package names must begin with the maintainer's Meteor Developer Account username and a colon, like so: iron:router. To publish a package for the first time, use meteor publish --create. Sometimes packages may contain binary code specific to an architecture (for example, they may use an npm package). In that case, ru

onCreated

Client Template.myTemplate.onCreated import { Template } from 'meteor/templating' Source Register a function to be called when an instance of this template is created. Arguments callback Function A function to be added as a callback.

Writing Packages

After reading this article, you’ll know: When to create an npm package and when to create an Atmosphere package The basics of writing an npm package The basics of writing an Atmosphere package How to depend on other packages, both from Atmosphere and npm How an Atmosphere package can integrate with Meteor’s build system The Meteor platform supports two package systems: npm, a repository of JavaScript modules for Node.js and the browser, and Atmosphere, a repository of packages written specifi

Introduction

What is Meteor? Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node.js and general JavaScript community. Meteor allows you to develop in one language, JavaScript, in all environments: application server, web browser, and mobile device. Meteor uses data on the wire, meaning the server sends data, not

this.changed

Server this.changed(collection, id, fields) Source Call inside the publish function. Informs the subscriber that a document in the record set has been modified. Arguments collection String The name of the collection that contains the changed document. id String The changed document's ID. fields Object The fields in the document that have changed, together with their new values. If a field is not present in fields it was left unchanged; if it is present in fields and has a val

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.

meteor update

meteor update Attempts to bring you to the latest version of Meteor, and then to upgrade your packages to their latest versions. By default, update will not break compatibility. For example, let's say packages A and B both depend on version 1.1.0 of package X. If a new version of A depends on X@2.0.0, but there is no new version of package B, running meteor update will not update A, because doing so will break package B. You can pass in the flag --packages-only to update only the packages, and

Template.registerHelper

Client Template.registerHelper(name, function) import { Template } from 'meteor/templating' Source Defines a helper function which can be used from all templates. Arguments name String The name of the helper function you are defining. function Function The helper function itself.