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

Function parseStringArray

apps/sim/blocks/blocks/firecrawl.ts:566–577  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

564 if (timeout) result.timeout = Number.parseInt(timeout)
565
566 const parseStringArray = (value: unknown): string[] | undefined => {
567 if (Array.isArray(value)) return value as string[]
568 if (typeof value === 'string' && value.trim() !== '') {
569 try {
570 const parsed = JSON.parse(value)
571 return Array.isArray(parsed) ? parsed : undefined
572 } catch {
573 return undefined
574 }
575 }
576 return undefined
577 }
578
579 const includeTagsParsed = parseStringArray(params.includeTags)
580 if (includeTagsParsed) result.includeTags = includeTagsParsed

Callers 1

firecrawl.tsFile · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected