Skip to content

toMap

@tsed/core

Usage

typescript
import { toMap } from "@tsed/core";

See /packages/core/src/utils/toMap.ts.

Overview

ts
function toMap<K extends keyof any = any, V = any>(input: Record<K, V> | V[], keyOrFn?: ToMapIdentity<V>): Map<K, V>;

Description

Converts an array or object to a Map using a key extraction strategy.

Released under the MIT License.