(value: unknown)
| 80 | * `JSON.stringify` rejects, e.g. a BigInt) — unknown size, not zero. |
| 81 | */ |
| 82 | const measureResultChars = (value: unknown): number => { |
| 83 | if (value == null) return 0; |
| 84 | if (typeof value === "string") return value.length; |
| 85 | // 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 |
| 86 | try { |
| 87 | return JSON.stringify(value)?.length ?? 0; |
| 88 | } catch { |
| 89 | return -1; |
| 90 | } |
| 91 | }; |
| 92 | |
| 93 | /** |
| 94 | * Outcome attributes are a pure function of an immutable `ExecuteResult`, but |
no outgoing calls
no test coverage detected