js-util

Home > rc-js-util > mapEntriesToArray

mapEntriesToArray() function

Converts a Map into an Array of its key value pairs.

Signature:

export declare function mapEntriesToArray<TKey, TValue>(map: Map<TKey, TValue>): [TKey, TValue][];

Parameters

Parameter Type Description
map Map<TKey, TValue>  

Returns:

[TKey, TValue][]

An array of tuples, the first value corresponding to the key and the second to the value.

Remarks

See mapEntriesToArray().