MCPcopy Create free account
hub / github.com/ShipSecAI/studio / normalizeComponentCategory

Function normalizeComponentCategory

packages/shared/src/component-categories.ts:250–257  ·  view source on GitHub ↗
(value?: string | null)

Source from the content-addressed store, hash-verified

248}
249
250export function normalizeComponentCategory(value?: string | null): ComponentCategory | null {
251 if (!value) {
252 return null;
253 }
254
255 const normalized = value.trim().toLowerCase();
256 return isComponentCategory(normalized) ? normalized : null;
257}
258
259export function resolveComponentCategory(value?: string | null): ComponentCategory {
260 return normalizeComponentCategory(value) ?? DEFAULT_COMPONENT_CATEGORY;

Callers 3

resolveCategoryFunction · 0.90
categorizeComponentFunction · 0.90
resolveComponentCategoryFunction · 0.85

Calls 1

isComponentCategoryFunction · 0.85

Tested by

no test coverage detected