safe-stable-stringify
Advanced tools
Changelog
v2.3.0
Error
constructor as circularValue
option to throw on circular references as the regular JSON.stringify would:import { configure } from 'safe-stable-stringify'
const object = {}
object.circular = object;
const stringify = configure({ circularValue: TypeError })
stringify(object)
// TypeError: Converting circular structure to JSON
Changelog
v2.0.0
bigint
option and set it to false
.