Skip to content

@pgege/kaboo-react


Function: topLevelGroups()

topLevelGroups(groups): GroupEntry[]

Defined in: utils/groups.ts:56

Top-level groups are those without a parent. Uses the explicit parentGroup field rather than parsing dot-paths out of the group id, so group names are free to contain any characters.

Parameters

groups

Record\<string, StreamGroup>

Returns

GroupEntry[]

Example

import { topLevelGroups } from "@pgege/kaboo-react";

function rootCount(groups: Parameters<typeof topLevelGroups>[0]) {
  return topLevelGroups(groups).length;
}