MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeList

Function normalizeList

apps/sim/lib/auth/access-control.ts:55–58  ·  view source on GitHub ↗
(values: unknown)

Source from the content-addressed store, hash-verified

53}
54
55function normalizeList(values: unknown): string[] {
56 if (!Array.isArray(values)) return []
57 return Array.from(new Set(values.map((v) => String(v).trim().toLowerCase()).filter(Boolean)))
58}
59
60function parseCsv(value: string | undefined): string[] {
61 return normalizeList(value?.split(','))

Callers 2

parseCsvFunction · 0.85
parseConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected