the data to stringify
the number of spaces to use in
Without modifications, JSON.stringify has several shortcomings in
debugging and logging usage:
bigintUint8Arrays are often encoded in base 10 with newlines between each
index itemfunctions and symbols are not clearly markedThis method is more helpful in these cases:
bigint: 0n → <bigint: 0n>Uint8Array: Uint8Array.of(0,0) → <Uint8Array: 0x0000>function: (x) => x * 2 → <function: (x) => x * 2>symbol: Symbol(A) → <symbol: Symbol(A)>Generated using TypeDoc
A safe method to
JSON.stringifya value, useful for debugging and logging purposes.