- objectify<T, Key, Value>(array, getKey, getValue?): Record<Key, Value>
Type Parameters
- T
- Key extends string | number | symbol
- Value = T
Parameters
- array: readonly T[]
- getKey: ((item: T) => Key)
- getValue: ((item: T) => Value) = ...
Returns Record<Key, Value>
Description
Convert an array to a dictionary by mapping each item into a dictionary key & value
Example