js-util

Home > rc-js-util > arrayMap

arrayMap() function

Like Array.map.

Signature:

export declare function arrayMap<TItem, TMapped>(items: ArrayLike<TItem>, callback: (item: TItem, index: number) => TMapped): TMapped[];

Parameters

Parameter Type Description
items ArrayLike<TItem>  
callback (item: TItem, index: number) => TMapped  

Returns:

TMapped[]

Remarks

Has more consistent performance characteristics cross platform than the built in Array.map

See arrayMap().