(value: unknown)
| 72 | * `JSON.stringify` rejects, e.g. a BigInt) — unknown size, not zero. |
| 73 | */ |
| 74 | const measureResultChars = (value: unknown): number => { |
| 75 | if (value == null) return 0; |
| 76 | if (typeof value === "string") return value.length; |
| 77 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: best-effort size probe over an arbitrary sandbox value; a stringify rejection must not fail the execution path |
| 78 | try { |
| 79 | return JSON.stringify(value)?.length ?? 0; |
| 80 | } catch { |
| 81 | return -1; |
| 82 | } |
| 83 | }; |
| 84 | |
| 85 | /** |
| 86 | * Outcome attributes are a pure function of an immutable `ExecuteResult`, but |
no outgoing calls
no test coverage detected