MCPcopy
hub / github.com/date-fns/date-fns / findCategory

Function findCategory

pkgs/docs/src/utils.ts:17–23  ·  view source on GitHub ↗
(ref: ContainerReflection, id: number)

Source from the content-addressed store, hash-verified

15 * @returns the reflection category string if found
16 */
17export function findCategory(ref: ContainerReflection, id: number) {
18 const category = ref.categories?.find((category) =>
19 // TODO: Fix the type error if TypeDoc becomes more eloborate
20 (category.children as unknown as number[]).includes(id),
21 );
22 return category?.title;
23}
24
25/**
26 * Find reflection summary.

Callers 1

getFnPagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected