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

Function normalizeStringArray

apps/sim/lib/core/utils/arrays.ts:4–10  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

2 * Normalizes optional string-list values loaded from untyped persisted state.
3 */
4export function normalizeStringArray(value: unknown): string[] {
5 if (!Array.isArray(value)) {
6 return []
7 }
8
9 return value.filter((item): item is string => typeof item === 'string')
10}

Callers 4

arrays.test.tsFile · 0.90
executeMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected