Skip to content

xdash API Reference v0.5.14


xdash API Reference / map

Function: map()

map<T, U>(arr, fn): U[]

Defined in: src/array.ts:156

Maps an array of values to an array of results of the callback.

Type Parameters

T

T

U

U

Parameters

arr

T[]

array to map

fn

(value, index, array) => U

callback to map the array

Returns

U[]

the mapped array

Released under the MIT License.