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

Function getJsonAndSize

apps/sim/lib/execution/payloads/serializer.ts:26–39  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

24}
25
26function getJsonAndSize(value: unknown): { json: string; size: number } | null {
27 try {
28 const json = JSON.stringify(value)
29 if (json === undefined) {
30 return null
31 }
32 return {
33 json,
34 size: Buffer.byteLength(json, 'utf8'),
35 }
36 } catch {
37 return null
38 }
39}
40
41function stripUserFileBase64<T extends { base64?: unknown }>(value: T): Omit<T, 'base64'> {
42 const { base64: _base64, ...rest } = value

Callers 4

compactValueFunction · 0.85
forceStoreValueFunction · 0.85
compactSubflowResultsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected