1
0
mirror of https://github.com/dzeiocom/libs.git synced 2025-06-06 08:19:53 +00:00

Updated description of objectMap

Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-12-08 17:13:28 +01:00
parent c56cd074ec
commit 679291d7a8

View File

@ -3,7 +3,7 @@
*
* (Same as Array.map)
* @param obj the object to remap
* @param fn the fn to run
* @param fn the function to run for each key: value pairs
*/
export function objectMap<T = any, J = any>(obj: Record<string, T>, fn: (value: T, key: string) => J): Array<J> {
const list: Array<J> = []