Ember.observer()

observer (propertyNames, func) public Defined in packages/ember-metal/lib/mixin.js:703 Specify a method that observes property changes. Ember.Object.extend({ valueObserver: Ember.observer('value', function() { // Executes whenever the "value" property changes }) }); Also available as Function.prototype.observes if prototype extensions are enabled. Parameters: propertyNames String func Function Returns: func

Ember.mixin()

mixin (obj, mixins) private Defined in packages/ember-metal/lib/mixin.js:386 Parameters: obj mixins Returns: obj

Ember.on()

on (eventNames, func) public Defined in packages/ember-metal/lib/events.js:280 Define a property as a function that should be executed when a specified event or events are triggered. let Job = Ember.Object.extend({ logCompleted: Ember.on('completed', function() { console.log('Job completed!'); }) }); let job = Job.create(); Ember.sendEvent(job, 'completed'); // Logs 'Job completed!' Parameters: eventNames String func Function Returns: func

Ember.meta()

meta (obj, writable) Objectprivate Defined in packages/ember-metal/lib/meta.js:360 Retrieves the meta hash for an object. If writable is true ensures the hash is writable for this object as well. The meta object contains information about computed property descriptors as well as any watched properties and other information. You generally will not access this information directly but instead work with higher level methods that manipulate this hash indirectly. Parameters: obj Object The

Ember.makeArray()

makeArray (obj) Arrayprivate Defined in packages/ember-metal/lib/utils.js:370 Forces the passed object to be part of an array. If the object is already an array, it will return the object. Otherwise, it will add the object to an array. If obj is null or undefined, it will return an empty array. Ember.makeArray(); // [] Ember.makeArray(null); // [] Ember.makeArray(undefined); // [] Ember.makeArray('lindsay'); // ['lindsay'] Ember.makeArray([1, 2, 42]); // [1, 2, 42] l

Ember.listenersFor()

listenersFor (obj, eventName) private Defined in packages/ember-metal/lib/events.js:257 Parameters: obj eventName String

Ember.merge()

merge (original, updates) Objectpublic Defined in packages/ember-metal/lib/merge.js:1 Merge the contents of two objects together into the first object. Ember.merge({ first: 'Tom' }, { last: 'Dale' }); // { first: 'Tom', last: 'Dale' } var a = { first: 'Yehuda' }; var b = { last: 'Katz' }; Ember.merge(a, b); // a == { first: 'Yehuda', last: 'Katz' }, b == { last: 'Katz' } Parameters: original Object The object to merge into updates Object The object to copy properties from Retur

Ember.K()

KObjectpublic Defined in packages/ember-metal/lib/index.js:407 An empty function useful for some operations. Always returns this. Returns: Object

Ember.isPresent()

isPresent (obj) Booleanpublic Defined in packages/ember-metal/lib/is_present.js:3 Available since 1.8.0 A value is present if it not isBlank. Ember.isPresent(); // false Ember.isPresent(null); // false Ember.isPresent(undefined); // false Ember.isPresent(''); // false Ember.isPresent(' '); // false Ember.isPresent('\n\t'); // false Ember.isPresent([]); // false Ember.isPresent({ length: 0 }) // false Ember.isP

Ember.isEmpty()

isEmpty (obj) Booleanpublic Defined in packages/ember-metal/lib/is_empty.js:4 Verifies that a value is null or an empty string, empty array, or empty function. Constrains the rules on Ember.isNone by returning true for empty string and empty arrays. Ember.isEmpty(); // true Ember.isEmpty(null); // true Ember.isEmpty(undefined); // true Ember.isEmpty(''); // true Ember.isEmpty([]); // true Ember.isEmpty({}); // false Embe