stringify should throw an error when serializing a BigInt to match JSON behavior.
const json = JSON.stringify(123n)
// Uncaught TypeError: Do not know how to serialize a BigInt
const json5 = JSON5.stringify(123n)
// json5 == undefined
In order to serialize a BigInt, one could use a replacer function that converts a BigInt to either a number or a string. Alternatively, we could add an option to stringify that enables BigInt support.