Skip to content

Latest commit

 

History

History
66 lines (36 loc) · 1.08 KB

File metadata and controls

66 lines (36 loc) · 1.08 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

Home > @rushstack/node-core-library > MapExtensions > toObject

MapExtensions.toObject() method

Converts a string-keyed map to an object.

Signature:

static toObject<TValue>(map: Map<string, TValue>): {
        [key: string]: TValue;
    };

Parameters

Parameter

Type

Description

map

Map<string, TValue>

The map that the object properties will be sourced from

Returns:

{ [key: string]: TValue; }

Remarks

This function has the same effect as Object.fromEntries(map.entries()) in supported versions of Node (<></>><></>= 12.0.0).