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.

13 lines 265 B
/** * @public * Converts a `Map` into an `Array` of its keys. * * @returns The keys of the map. * * @remarks * See {@link mapKeysToArray}. */ export function mapKeysToArray<TKey, TValue>(map: Map<TKey, TValue>): TKey[] { return Array.from(map.keys()); }