Function splitBy

  • Splits an array of objects based on their values at a given key.

    Type Parameters

    • T extends Record<string, unknown>

    • K extends string | number | symbol

    • U extends Record<K, string | number>

    Parameters

    • objects: U[]

      The array to split.

    • key: K

      The key of T.

    Returns U[][]

Generated using TypeDoc