Documentation / @super-line/core / safeSnapshot
Function: safeSnapshot()
safeSnapshot(
value,redact?):unknown
Defined in: packages/core/src/snapshot.ts:25
Structurally copy value for display, replacing anything unserializable with a marker: functions, symbols and bigints become strings, Dates become ISO strings, cycles become '[Circular]', and a non-plain prototype is recorded as a #type key rather than reconstructed. Keys named in redact are replaced with '[Redacted]' at every depth.
The result is always JSON-compliant, which is load-bearing for the client tap: its drain channel throws on the whole batch — not the offending row — if any value is not.
Parameters
value
unknown
redact?
ReadonlySet<string>
Returns
unknown