Ember.computed.map()

map (dependentKey, callback) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:168 Returns an array mapped via the callback The callback method you provide should have the following signature. item is the current item in the iteration. index is the integer index of the current item in the iteration. function(item, index); Example let Hamster = Ember.Object.extend({ excitingChores: Ember.computed.map('chores', function(chore, index) {

Ember.computed.lte()

lte (dependentKey, value) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/computed_macros.js:389 A computed property that returns true if the provided dependent property is less than or equal to the provided value. Example let Hamster = Ember.Object.extend({ needsMoreBananas: Ember.computed.lte('numBananas', 3) }); let hamster = Hamster.create(); hamster.get('needsMoreBananas'); // true hamster.set('numBananas', 5); hamster.get('needsMoreBananas'); // false h

Ember.computed.lt()

lt (dependentKey, value) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/computed_macros.js:355 A computed property that returns true if the provided dependent property is less than the provided value. Example let Hamster = Ember.Object.extend({ needsMoreBananas: Ember.computed.lt('numBananas', 3) }); let hamster = Hamster.create(); hamster.get('needsMoreBananas'); // true hamster.set('numBananas', 3); hamster.get('needsMoreBananas'); // false hamster.set('nu

Ember.computed.intersect()

intersect (propertyKey) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:438 A computed property which returns a new array with all the duplicated elements from two or more dependent arrays. Example let obj = Ember.Object.extend({ friendsInCommon: Ember.computed.intersect('adaFriends', 'charlesFriends') }).create({ adaFriends: ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'], charlesFriends: ['William King', '

Ember.computed.gte()

gte (dependentKey, value) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/computed_macros.js:321 A computed property that returns true if the provided dependent property is greater than or equal to the provided value. Example let Hamster = Ember.Object.extend({ hasTooManyBananas: Ember.computed.gte('numBananas', 10) }); let hamster = Hamster.create(); hamster.get('hasTooManyBananas'); // false hamster.set('numBananas', 3); hamster.get('hasTooManyBananas'); //

Ember.computed.gt()

gt (dependentKey, value) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/computed_macros.js:287 A computed property that returns true if the provided dependent property is greater than the provided value. Example let Hamster = Ember.Object.extend({ hasTooManyBananas: Ember.computed.gt('numBananas', 10) }); let hamster = Hamster.create(); hamster.get('hasTooManyBananas'); // false hamster.set('numBananas', 3); hamster.get('hasTooManyBananas'); // false hamster

Ember.computed.filterBy()

filterBy (dependentKey, propertyKey, value) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:291 Filters the array by the property and value let Hamster = Ember.Object.extend({ remainingChores: Ember.computed.filterBy('chores', 'done', false) }); let hamster = Hamster.create({ chores: [ { name: 'cook', done: true }, { name: 'clean', done: true }, { name: 'write more unit tests', done: false } ] }); hamster.get('remaini

Ember.computed.filter()

filter (dependentKey, callback) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:248 Filters the array by the callback. The callback method you provide should have the following signature. item is the current item in the iteration. index is the integer index of the current item in the iteration. array is the dependant array itself. function(item, index, array); let Hamster = Ember.Object.extend({ remainingChores: Ember.computed.filter(

Ember.computed.equal()

equal (dependentKey, value) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/computed_macros.js:253 A computed property that returns true if the provided dependent property is equal to the given value. Example let Hamster = Ember.Object.extend({ napTime: Ember.computed.equal('state', 'sleepy') }); let hamster = Hamster.create(); hamster.get('napTime'); // false hamster.set('state', 'sleepy'); hamster.get('napTime'); // true hamster.set('state', 'hungry'); hams

Ember.computed.empty()

empty (dependentKey) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/computed_macros.js:53 Available since 1.6.0 A computed property that returns true if the value of the dependent property is null, an empty string, empty array, or empty function. Example let ToDoList = Ember.Object.extend({ isDone: Ember.computed.empty('todos') }); let todoList = ToDoList.create({ todos: ['Unit Test', 'Documentation', 'Release'] }); todoList.get('isDone'); // false todoLis