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])
        • (__namedParameters): [T, V]
        • Parameters

          • __namedParameters: [T, V]

          Returns [T, V]

    Returns Record<T, V>

Generated using TypeDoc