UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

58 lines (28 loc) 902 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [mapEntriesToArray](./rc-js-util.mapentriestoarray.md) ## mapEntriesToArray() function Converts a `Map` into an `Array` of its key value pairs. **Signature:** ```typescript export declare function mapEntriesToArray<TKey, TValue>(map: Map<TKey, TValue>): [TKey, TValue][]; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> map </td><td> Map&lt;TKey, TValue&gt; </td><td> </td></tr> </tbody></table> **Returns:** \[TKey, TValue\]\[\] An array of tuples, the first value corresponding to the key and the second to the value. ## Remarks See [mapEntriesToArray()](./rc-js-util.mapentriestoarray.md)<!-- -->.