Function objectMap2

  • Shorthand for Object.fromEntries(Object.entries(obj).map(fn)) Similar to objectMap but uses Object.fromEntries to create the new object, so keys can also be changed.

    Type Parameters

    • T extends string | number | symbol
    • V = any

    Parameters

    • obj: Record<T, V>
    • fn: (__namedParameters: [T, V]) => [T, V]

    Returns Record<T, V>