(value: unknown)
| 24 | } |
| 25 | |
| 26 | function 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 | |
| 41 | function stripUserFileBase64<T extends { base64?: unknown }>(value: T): Omit<T, 'base64'> { |
| 42 | const { base64: _base64, ...rest } = value |
no outgoing calls
no test coverage detected