- map<T, K>(obj: T, fn: ((value: T[K], key: K, object: T) => Record<string, unknown>)): Record<string, unknown>
-
Type Parameters
-
T extends Record<string, unknown>
-
K extends string | number | symbol
Parameters
-
obj: T
-
fn: ((value: T[K], key: K, object: T) => Record<string, unknown>)
-
- (value: T[K], key: K, object: T): Record<string, unknown>
-
Parameters
-
value: T[K]
-
key: K
-
object: T
Returns Record<string, unknown>
Returns Record<string, unknown>
Creates an object with keys and values generated by running the provided function for each value
Example