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

Function truncateString

apps/sim/lib/execution/isolated-vm.ts:223–231  ·  view source on GitHub ↗
(value: string, maxChars: number)

Source from the content-addressed store, hash-verified

221}
222
223function truncateString(value: string, maxChars: number): { value: string; truncated: boolean } {
224 if (value.length <= maxChars) {
225 return { value, truncated: false }
226 }
227 return {
228 value: `${value.slice(0, maxChars)}... [truncated ${value.length - maxChars} chars]`,
229 truncated: true,
230 }
231}
232
233function normalizeFetchOptions(options?: IsolatedFetchOptions): SecureFetchOptions {
234 if (!options) return { maxResponseBytes: MAX_FETCH_RESPONSE_BYTES }

Callers 1

secureFetchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected