Member Junction
    Preparing search index...
    • The items grouped by ID, each group in items order. Look a group up with .Get(id) ?? []; any casing works. Linear, where items.filter(x => UUIDsEqual(x.ParentID, id)) run once per id scans the whole list every time.

      Type Parameters

      Parameters

      • items: Iterable<T>

      Returns UUIDMap<T[]>

      const rolesByUser = GroupByUUID(userRoles, r => r.UserID);
      const roles = rolesByUser.Get(user.ID) ?? [];
    • The items grouped by ID, each group in items order. Look a group up with .Get(id) ?? []; any casing works. Linear, where items.filter(x => UUIDsEqual(x.ParentID, id)) run once per id scans the whole list every time.

      Type Parameters

      • T

      Parameters

      Returns UUIDMap<T[]>

      const rolesByUser = GroupByUUID(userRoles, r => r.UserID);
      const roles = rolesByUser.Get(user.ID) ?? [];