random

random The random package provides several functions for generating random numbers. It uses a cryptographically strong pseudorandom number generator when possible, but falls back to a weaker random number generator when cryptographically strong randomness is not available (on older browsers or on servers that don't have enough entropy to seed the cryptographically strong generator). Random.id([n]) Returns a unique identifier, such as "Jjwjg6gouWLXhMGKW", that is likely to be unique in the whol

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.

Template.currentData

Client Template.currentData() import { Template } from 'meteor/templating' Source Inside an onCreated, onRendered, or onDestroyed callback, returns the data context of the template. Inside an event handler, returns the data context of the template on which this event handler was defined. Inside a helper, returns the data context of the DOM node where the helper was used. Establishes a reactive dependency on the result.

cursor.forEach

Anywhere cursor.forEach(callback, [thisArg]) Source Call callback once for each matching document, sequentially and synchronously. Arguments callback Function Function to call. It will be called with three arguments: the document, a 0-based index, and cursor itself. thisArg Any An object which will be the value of this inside callback.

Meteor.loginWithPassword

Client Meteor.loginWithPassword(user, password, [callback]) import { Meteor } from 'meteor/meteor' Source Log the user in with a password. Arguments user Object or String Either a string interpreted as a username or an email; or an object with a single key: email, username or id. Username or email match in a case insensitive manner. password String The user's password. callback Function Optional callback. Called with no arguments on success, or with a single Error argument on

Accounts.verifyEmail

Client Accounts.verifyEmail(token, [callback]) import { Accounts } from 'meteor/accounts-base' Source Marks the user's email address as verified. Logs the user in afterwards. Arguments token String The token retrieved from the verification URL. callback Function Optional callback. Called with no arguments on success, or with a single Error argument on failure.

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.

meteor deploy

meteor deploy site Deploy the project in your current directory to Galaxy. You can deploy in debug mode by passing --debug. This will leave your source code readable by your favorite in-browser debugger, just like it is in local development mode. To delete an application you've deployed, specify the --delete option along with the site. You can add information specific to a particular deployment of your application by using the --settings option. The argument to --settings is a file containing

EJSON.parse

Anywhere EJSON.parse(str) import { EJSON } from 'meteor/ejson' Source Parse a string into an EJSON value. Throws an error if the string is not valid EJSON. Arguments str String A string to parse into an EJSON value.

HTTP.post

Anywhere HTTP.post(url, [callOptions], [asyncCallback]) import { HTTP } from 'meteor/http' Source Send an HTTP POST request. Equivalent to calling HTTP.call with "POST" as the first argument. Arguments url String The URL to which the request should be sent. callOptions Object Options passed on to HTTP.call. asyncCallback Function Callback that is called when the request is completed. Required on the client.