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

Function readTrimmed

apps/sim/connectors/x/x.ts:124–128  ·  view source on GitHub ↗

* Reads and trims a string config field, returning undefined when blank.

(value: unknown)

Source from the content-addressed store, hash-verified

122 * Reads and trims a string config field, returning undefined when blank.
123 */
124function readTrimmed(value: unknown): string | undefined {
125 if (typeof value !== 'string') return undefined
126 const trimmed = value.trim()
127 return trimmed.length > 0 ? trimmed : undefined
128}
129
130/**
131 * Performs an authenticated GET against the X API v2 and returns the parsed JSON.

Callers 2

buildListParamsFunction · 0.85
x.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected