MutableEnumerable#addObjects()

addObjects (objects) Objectpublic Defined in packages/ember-runtime/lib/mixins/mutable_enumerable.js:69 Adds each object in the passed enumerable to the receiver. Parameters: objects Ember.Enumerable the objects to add. Returns: Object receiver

MutableEnumerable

Ember.MutableEnumerable Class PUBLIC Uses: Ember.Enumerable Defined in: packages/ember-runtime/lib/mixins/mutable_enumerable.js:10 Module: ember-runtime This mixin defines the API for modifying generic enumerables. These methods can be applied to an object regardless of whether it is ordered or unordered. Note that an Enumerable can change even if it does not implement this mixin. For example, a MappedEnumerable cannot be directly modified but if its underlying enumerable changes, it will

MutableArray#unshiftObject()

unshiftObject (obj) public Defined in packages/ember-runtime/lib/mixins/mutable_array.js:259 Unshift an object to start of array. Works just like unshift() but it is KVO-compliant. let colors = ['red']; colors.unshiftObject('yellow'); // ['yellow', 'red'] colors.unshiftObject(['black']); // [['black'], 'yellow', 'red'] Parameters: obj * object to unshift Returns: object same object passed as a param

MutableArray#unshiftObjects()

unshiftObjects (objects) Ember.Arraypublic Defined in packages/ember-runtime/lib/mixins/mutable_array.js:280 Adds the named objects to the beginning of the array. Defers notifying observers until all objects have been added. let colors = ['red']; colors.unshiftObjects(['black', 'white']); // ['black', 'white', 'red'] colors.unshiftObjects('yellow'); // Type Error: 'undefined' is not a function Parameters: objects Ember.Enumerable the objects to add Returns: Ember.Array receiv

MutableArray#[]

[]public Inherited from Ember.Enumerable but overwritten in packages/ember-runtime/lib/mixins/array.js:281 This is the handler for the special array content property. If you get this property, it will return this. If you set this property to a new array, it will replace the current content. This property overrides the default property defined in Ember.Enumerable. Returns: this

MutableArray#replace()

replace (idx, amt, objects) public Defined in packages/ember-runtime/lib/mixins/mutable_array.js:69 Required. You must implement this method to apply this mixin. This is one of the primitives you must implement to support Ember.Array. You should replace amt objects started at idx with the objects in the passed array. You should also call this.enumerableContentDidChange() Parameters: idx Number Starting index in the array to replace. If idx >= length, then append to the end of the ar

MutableArray#reverseObjects()

reverseObjectsEmber.Arraypublic Defined in packages/ember-runtime/lib/mixins/mutable_array.js:301 Reverse objects in the array. Works just like reverse() but it is KVO-compliant. Returns: Ember.Array receiver

MutableArray#shiftObject()

shiftObjectpublic Defined in packages/ember-runtime/lib/mixins/mutable_array.js:234 Shift an object from start of array or nil if none are left. Works just like shift() but it is KVO-compliant. let colors = ['red', 'green', 'blue']; colors.shiftObject(); // 'red' console.log(colors); // ['green', 'blue'] Returns: object

MutableArray#removeObject()

removeObject (obj) Ember.Arraypublic Inherited from Ember.MutableEnumerable but overwritten in packages/ember-runtime/lib/mixins/mutable_array.js:351 Remove all occurrences of an object in the array. let cities = ['Chicago', 'Berlin', 'Lima', 'Chicago']; cities.removeObject('Chicago'); // ['Berlin', 'Lima'] cities.removeObject('Lima'); // ['Berlin'] cities.removeObject('Tokyo') // ['Berlin'] Parameters: obj * object to remove Returns: Ember.Array receiver

MutableArray#setObjects()

setObjects (objects) Ember.Arraypublic Defined in packages/ember-runtime/lib/mixins/mutable_array.js:320 Replace all the receiver's content with content of the argument. If argument is an empty array receiver will be cleared. let colors = ['red', 'green', 'blue']; colors.setObjects(['black', 'white']); // ['black', 'white'] colors.setObjects([]); // [] Parameters: objects Ember.Array array whose content will be used for replacing the content of the receiver Retur