@cprecioso/async-iterable-helpers
    Preparing search index...

    Function groupMapByKey

    • Groups items into a Map according to the value of their key property. Like groupMap, but the returned map's get narrows each group to the union members whose key property matches the requested key.

      Type Parameters

      • T
      • P extends string | number | symbol

      Parameters

      • key: P

        The property to group by.

      Returns SinkFn<
          T,
          { get<K>(key: K): Extract<Awaited<T>, Record<P, K>>[] | undefined } & Map<
              Awaited<T>[P],
              Awaited<T>[],
          >,
      >

      A sink resolving to a Map from each key to the items in that group, in source order.