This mixin defines the common interface implemented by enumerable objects in Ember. Most of these
methods follow the standard Array iteration API defined up to JavaScript 1.8 (excluding language-specific
features that cannot be emulated in older versions of JavaScript).
This mixin is applied automatically to the Array class on page load, so you can use any of these methods
on simple arrays. If Array already implements one of these methods, the mixin will not override them.
Properties
public hasEnumerableObservers: boolean
Methods
public any(callback: Function, target?: any): boolean
Parameters
-
callback: Function
-
target?: any optional
Returns
boolean
public anyBy(key: string, value?: string): boolean
Parameters
-
key: string
-
value?: string optional
Returns
boolean
public compact(): Array<any>
Returns
Array<any>
public contains(obj: any): boolean
Parameters
Returns
boolean
public enumerableContentDidChange(start: number, removing: number, adding: number): any
Parameters
-
start: number
-
removing: number
-
adding: number
Returns
any
public enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any
Parameters
-
start: number
-
-
adding: number
Returns
any
public enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any
Parameters
-
start: number
-
removing: number
-
Returns
any
public enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any
Parameters
Returns
any
public enumerableContentDidChange(removing: number, adding: number): any
Parameters
-
removing: number
-
adding: number
Returns
any
public enumerableContentDidChange(removing: Enumerable, adding: number): any
Parameters
Returns
any
public enumerableContentDidChange(removing: number, adding: Enumerable): any
Parameters
Returns
any
public enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any
Parameters
Returns
any
public every(callback: Function, target?: any): boolean
Parameters
-
callback: Function
-
target?: any optional
Returns
boolean
public everyBy(key: string, value?: string): boolean
Parameters
-
key: string
-
value?: string optional
Returns
boolean
public everyProperty(key: string, value?: string): boolean
Parameters
-
key: string
-
value?: string optional
Returns
boolean
public filter(callback: Function, target: any): Array<any>
Parameters
-
callback: Function
-
target: any
Returns
Array<any>
public filterBy(key: string, value?: string): Array<any>
Parameters
-
key: string
-
value?: string optional
Returns
Array<any>
public find(callback: Function, target: any): any
Parameters
-
callback: Function
-
target: any
Returns
any
public findBy(key: string, value?: string): any
Parameters
-
key: string
-
value?: string optional
Returns
any
public forEach(callback: Function, target?: any): any
Parameters
-
callback: Function
-
target?: any optional
Returns
any
public getEach(key: string): Array<any>
Parameters
Returns
Array<any>
public invoke(methodName: string, any?: Array<any>): Array<any>
Parameters
-
methodName: string
-
any?: Array<any> optional
Returns
Array<any>
public mapBy(key: string): Array<any>
Parameters
Returns
Array<any>
public nextObject(index: number, previousObject: any, context: any): any
Parameters
-
index: number
-
previousObject: any
-
context: any
Returns
any
public reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any
Parameters
-
-
initialValue: any
-
reducerProperty: string
Returns
any
public rejectBy(key: string, value?: string): Array<any>
Parameters
-
key: string
-
value?: string optional
Returns
Array<any>
public setEach(key: string, value?: any): any
Parameters
-
key: string
-
value?: any optional
Returns
any
public some(callback: Function, target?: any): boolean
Parameters
-
callback: Function
-
target?: any optional
Returns
boolean
public someProperty(key: string, value?: string): boolean
Parameters
-
key: string
-
value?: string optional
Returns
boolean
public toArray(): Array<any>
Returns
Array<any>