iterable_helpers.ts

Declarations
#

view source

create_map_by_property
#

iterable_helpers.ts view source

<T, K extends keyof T>(items: Iterable<T>, property: K): Map<T[K], T>

Creates a Map from an iterable, keyed by a specified property.

items

type Iterable<T>

property

type K

returns

Map<T[K], T>

Imported by
#