Enumerable#removeEnumerableObserver()

removeEnumerableObserver (target, opts) private Defined in packages/ember-runtime/lib/mixins/enumerable.js:898 Removes a registered enumerable observer. Parameters: target Object opts [Object] Returns: this

Enumerable#setEach()

setEach (key, value) Objectpublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:310 Sets the value on the named property for each member. This is more ergonomic than using other methods defined on this helper. If the object implements Ember.Observable, the value will be changed to set(), otherwise it will be set directly. null objects are skipped. Parameters: key String The key to set value Object The object to set Returns: Object receiver

Enumerable#reject()

reject (callback, target) Arraypublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:415 Returns an array with all of the items in the enumeration where the passed function returns false. This method is the inverse of filter(). The callback method you provide should have the following signature (all parameters are optional): function(item, index, enumerable); item is the current item in the iteration. index is the current index in the iteration enumerable is the enumerable o

Enumerable#rejectBy()

rejectBy (key, value) Arraypublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:463 Returns an array with the items that do not have truthy values for key. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to false. Parameters: key String the property to test value [String] optional value to test against. Returns: Array rejected array

Enumerable#nextObject()

nextObject (index, previousObject, context) Objectprivate Defined in packages/ember-runtime/lib/mixins/enumerable.js:102 Required. You must implement this method to apply this mixin. Implement this method to make your class enumerable. This method will be called repeatedly during enumeration. The index value will always begin with 0 and increment monotonically. You don't have to rely on the index value to determine what object to return, but you should always check the value and start from

Enumerable#mapBy()

mapBy (key) Arraypublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:361 Similar to map, this specialized function returns the value of the named property on all items in the enumeration. Parameters: key String name of the property Returns: Array The mapped array.

Enumerable#reduce()

reduce (callback, initialValue, reducerProperty) Objectpublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:685 This will combine the values of the enumerator into a single value. It is a useful way to collect a summary value from an enumeration. This corresponds to the reduce() method defined in JavaScript 1.8. The callback method you provide should have the following signature (all parameters are optional): function(previousValue, item, index, enumerable); previousValue is

Enumerable#lastObject

lastObjectObjectpublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:177 Helper method returns the last object from a collection. If your enumerable contains only one object, this method should always return that object. If your enumerable is empty, this method should return undefined. let arr = ['a', 'b', 'c']; arr.get('lastObject'); // 'c' let arr = []; arr.get('lastObject'); // undefined Returns: Object the last object or undefined

Enumerable#map()

map (callback, target) Arraypublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:326 Maps all of the items in the enumeration to another value, returning a new array. This method corresponds to map() defined in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): function(item, index, enumerable); item is the current item in the iteration. index is the current index in the iteration. enumerable is the enumerable

Enumerable#isEvery()

isEvery (key, value) Booleanpublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:595 Available since 1.3.0 Returns true if the passed property resolves to the value of the second argument for all items in the enumerable. This method is often simpler/faster than using a callback. Parameters: key String the property to test value [String] optional value to test against. Defaults to `true` Returns: Boolean