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

Function normalizeStringRecord

apps/sim/lib/core/utils/records.ts:18–31  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

16 * semantics at execution boundaries.
17 */
18export function normalizeStringRecord(value: unknown): StringRecord {
19 if (!isPlainRecord(value)) {
20 return {}
21 }
22
23 const normalized: StringRecord = {}
24 for (const [key, entryValue] of Object.entries(value)) {
25 if (entryValue === undefined || entryValue === null) {
26 continue
27 }
28 normalized[key] = typeof entryValue === 'string' ? entryValue : String(entryValue)
29 }
30 return normalized
31}
32
33/**
34 * Normalizes record-of-record maps such as block output schema maps.

Callers 9

execute.tsFile · 0.90
prepareToolExecutionFunction · 0.90
records.test.tsFile · 0.90
executeMethod · 0.90
buildProviderRequestMethod · 0.90
constructorMethod · 0.90

Calls 1

isPlainRecordFunction · 0.90

Tested by

no test coverage detected