• An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of running each of its own enumerable properties through iteratee, with each invocation potentially mutating the accumulator object. The iteratee is invoked with four arguments: (accumulator, value, key, object). Iteratee functions may exit iteration early by explicitly returning false.

    Type Parameters

    • T
    • TResult

    Parameters

    • object: readonly T[]

      The object to iterate over.

    • iteratee: MemoVoidArrayIterator<T, TResult>

      The function invoked per iteration.

    • Optionalaccumulator: TResult

      The custom accumulator value.

    Returns TResult

    Returns the accumulated value.

  • Type Parameters

    • T
    • TResult

    Parameters

    • object: Dictionary<T>
    • iteratee: MemoVoidDictionaryIterator<T, string, TResult>
    • Optionalaccumulator: TResult

    Returns TResult

    _.transform

  • Type Parameters

    • T extends object
    • TResult

    Parameters

    • object: T
    • iteratee: MemoVoidDictionaryIterator<T[keyof T], keyof T, TResult>
    • Optionalaccumulator: TResult

    Returns TResult

    _.transform

  • Parameters

    • object: any[]

    Returns any[]

    _.transform

  • Parameters

    • object: object

    Returns Dictionary<any>

    _.transform