(value: unknown)
| 37 | canonicalSnapshot(incoming) === canonicalSnapshot(recorded) |
| 38 | |
| 39 | export const safeText = (value: unknown) => { |
| 40 | if (value === undefined) return "undefined" |
| 41 | if (secretFindings(value).length > 0) return JSON.stringify(REDACTED) |
| 42 | const text = JSON.stringify(value) |
| 43 | if (!text) return typeof value |
| 44 | return text.length > 300 ? `${text.slice(0, 300)}...` : text |
| 45 | } |
| 46 | |
| 47 | const jsonBody = (body: string) => Option.getOrUndefined(decodeJson(body)) |
| 48 |
no test coverage detected