MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / compactUnique

Function compactUnique

apps/web/src/lib/security-headers.ts:11–14  ·  view source on GitHub ↗
(values: Array<string | null | undefined>)

Source from the content-addressed store, hash-verified

9 'https://e115e769bcdd4c3d66af59d3332cb394.r2.cloudflarestorage.com';
10
11function compactUnique(values: Array<string | null | undefined>): string[] {
12 const compacted = values.filter((value): value is string => Boolean(value && value.length > 0));
13 return Array.from(new Set(compacted));
14}
15
16function originFromUrl(value: string | undefined): string | null {
17 if (!value) return null;

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected