Class NativeArray

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(arr: Array<any>): NativeArray

Parameters

  • arr: Array<any>

Returns

NativeArray

Properties

public @each: EachProxy

public Boolean: boolean

public []: Array<any>

public addObserver: ModifyObserver

public firstObject: any

public hasEnumerableObservers: boolean

public lastObject: any

public length: number

public map: ItemIndexEnumerableCallbackTarget

public reject: ItemIndexEnumerableCallbackTarget

Methods

public addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public addObject(object: any): any

Parameters

  • object: any

Returns

any

public addObjects(objects: Enumerable): Array<any>

Parameters

Returns

Array<any>

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 arrayContentDidChange(startIdx: number, removeAmt: number, addAmt: number): Array<any>

Parameters

  • startIdx: number
  • removeAmt: number
  • addAmt: number

Returns

Array<any>

public arrayContentWillChange(startIdx: number, removeAmt: number, addAmt: number): Array<any>

Parameters

  • startIdx: number
  • removeAmt: number
  • addAmt: number

Returns

Array<any>

public beginPropertyChanges(): Array<any>

Returns

Array<any>

public cacheFor(keyName: string): any

Parameters

  • keyName: string

Returns

any

public clear(): Array<any>

Returns

Array<any>

public compact(): Array<any>

Returns

Array<any>

public contains(obj: any): boolean

Parameters

  • obj: any

Returns

boolean

public copy(deep: boolean): Array<any>

Parameters

  • deep: boolean

Returns

Array<any>

public decrementProperty(keyName: string, decrement?: number): number

Parameters

  • keyName: string
  • decrement?: number optional

Returns

number

public endPropertyChanges(): Array<any>

Returns

Array<any>

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
  • removing: Enumerable
  • adding: number

Returns

any

public enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any

Parameters

  • start: number
  • removing: number
  • adding: Enumerable

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 enumerableContentWillChange(removing: number, adding: number): Array<any>

Parameters

  • removing: number
  • adding: number

Returns

Array<any>

public enumerableContentWillChange(removing: Enumerable, adding: number): Array<any>

Parameters

Returns

Array<any>

public enumerableContentWillChange(removing: number, adding: Enumerable): Array<any>

Parameters

Returns

Array<any>

public enumerableContentWillChange(removing: Enumerable, adding: Enumerable): Array<any>

Parameters

Returns

Array<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?: any): boolean

Parameters

  • key: string
  • value?: any 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 frozenCopy(): Array<any>

Returns

Array<any>

public get(keyName: string): any

Parameters

  • keyName: string

Returns

any

public getEach(key: string): Array<any>

Parameters

  • key: string

Returns

Array<any>

public getProperties(string?: Array<any>): {}

Parameters

  • string?: Array<any> optional

Returns

{}

public getProperties(keys: Array<string>): {}

Parameters

  • keys: Array<string>

Returns

{}

public getWithDefault(keyName: string, defaultValue: any): any

Parameters

  • keyName: string
  • defaultValue: any

Returns

any

public hasObserverFor(key: string): boolean

Parameters

  • key: string

Returns

boolean

public incrementProperty(keyName: string, increment?: number): number

Parameters

  • keyName: string
  • increment?: number optional

Returns

number

public indexOf(object: any, startAt: number): number

Parameters

  • object: any
  • startAt: number

Returns

number

public insertAt(idx: number, object: any): Array<any>

Parameters

  • idx: number
  • object: any

Returns

Array<any>

public invoke(methodName: string, any?: Array<any>): Array<any>

Parameters

  • methodName: string
  • any?: Array<any> optional

Returns

Array<any>

public lastIndexOf(object: any, startAt: number): number

Parameters

  • object: any
  • startAt: number

Returns

number

public mapBy(key: string): Array<any>

Parameters

  • key: string

Returns

Array<any>

public nextObject(index: number, previousObject: any, context: any): any

Parameters

  • index: number
  • previousObject: any
  • context: any

Returns

any

public notifyPropertyChange(keyName: string): Array<any>

Parameters

  • keyName: string

Returns

Array<any>

public objectAt(idx: number): any

Parameters

  • idx: number

Returns

any

public objectsAt(number?: Array<any>): Array<any>

Parameters

  • number?: Array<any> optional

Returns

Array<any>

public popObject(): any

Returns

any

public propertyDidChange(keyName: string): Array<any>

Parameters

  • keyName: string

Returns

Array<any>

public propertyWillChange(keyName: string): Array<any>

Parameters

  • keyName: string

Returns

Array<any>

public pushObject(obj: any): any

Parameters

  • obj: any

Returns

any

public pushObjects(any?: Array<any>): Array<any>

Parameters

  • any?: Array<any> optional

Returns

Array<any>

public reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any

Parameters

Returns

any

public rejectBy(key: string, value?: string): Array<any>

Parameters

  • key: string
  • value?: string optional

Returns

Array<any>

public removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public removeAt(start: number, len: number): any

Parameters

  • start: number
  • len: number

Returns

any

public removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public removeObject(object: any): any

Parameters

  • object: any

Returns

any

public removeObjects(objects: Enumerable): Array<any>

Parameters

Returns

Array<any>

public removeObserver(key: string, target: any, method: string): Observable

Parameters

  • key: string
  • target: any
  • method: string

Returns

Observable

public removeObserver(key: string, target: any, method: Function): Observable

Parameters

  • key: string
  • target: any
  • method: Function

Returns

Observable

public replace(idx: number, amt: number, objects: Array<any>): any

Parameters

  • idx: number
  • amt: number
  • objects: Array<any>

Returns

any

public reverseObjects(): Array<any>

Returns

Array<any>

public set(keyName: string, value: any): Array<any>

Parameters

  • keyName: string
  • value: any

Returns

Array<any>

public setEach(key: string, value?: any): any

Parameters

  • key: string
  • value?: any optional

Returns

any

public setObjects(objects: Array<any>): Array<any>

Parameters

  • objects: Array<any>

Returns

Array<any>

public setProperties(hash: {}): Array<any>

Parameters

  • hash: {}

Returns

Array<any>

public shiftObject(): any

Returns

any

public slice(beginIndex?: number, endIndex?: number): Array<any>

Parameters

  • beginIndex?: number optional
  • endIndex?: number optional

Returns

Array<any>

public some(callback: Function, target?: any): boolean

Parameters

  • callback: Function
  • target?: any optional

Returns

boolean

public someProperty(key: string, value?: any): boolean

Parameters

  • key: string
  • value?: any optional

Returns

boolean

public toArray(): Array<any>

Returns

Array<any>

public toggleProperty(keyName: string): any

Parameters

  • keyName: string

Returns

any

public uniq(): Array<any>

Returns

Array<any>

public unshiftObject(object: any): any

Parameters

  • object: any

Returns

any

public unshiftObjects(objects: Array<any>): Array<any>

Parameters

  • objects: Array<any>

Returns

Array<any>

public without(value: any): Array<any>

Parameters

  • value: any

Returns

Array<any>