- _map<T1, T2>(fn, arr): T2[]
Parameters
- fn: ((val, index?, arr?) => T2)
- (val, index?, arr?): T2
Parameters
- val: T1
Optional
index: numberOptional
arr: T1[]
Returns T2
- arr: T1[]
Returns T2[]
- _map<T1, T2>(fn, obj): Record<string, T2>
Parameters
- fn: ((val, key?, obj?) => T2)
- (val, key?, obj?): T2
Parameters
- val: T1
Optional
key: stringOptional
obj: Record<string, T1>
Returns T2
- obj: Record<string, T1>
Returns Record<string, T2>
Change array or object by appling function to it's elements
For each element, provided function is called with element value, index/key and original container.