Function reduceKey

renamed to reduceByKey

  • Type Parameters

    • S extends Record<string | number | symbol, any>
    • T

    Parameters

    • subject: S
    • callbackfn: ((previousValue: T, key: keyof S, currentIndex: number, array: string[], subject: S) => T)
        • (previousValue, key, currentIndex, array, subject): T
        • Parameters

          • previousValue: T
          • key: keyof S
          • currentIndex: number
          • array: string[]
          • subject: S

          Returns T

    • initialValue: T

    Returns T