• The opposite of mapValues; this function creates an object with the same values as object and keys generated by running each own enumerable string keyed property of object through iteratee.

    Contribution to minified bundle size, when it is the only function imported:

    • Lodash: 16,189 bytes
    • Micro-dash: 123 bytes

    Type Parameters

    • A extends readonly any[]
    • O extends PropertyKey

    Parameters

    • array: Nil | A
    • iteratee: ((item, index) => O)
        • (item, index): O
        • Parameters

          • item: A[number]
          • index: number

          Returns O

    Returns Record<O, A[number]>

  • Type Parameters

    • T
    • O extends PropertyKey

    Parameters

    • object: T
    • iteratee: ObjectIteratee<NonNullable<T>, O>

    Returns IfCouldBe<T, Nil, EmptyObject> | Record<O, NonNullable<T>[keyof NonNullable<T>]>