Repository URL to install this package:
|
Version:
2.1.0-1 ▾
|
vending-mp-tcn-dep
/
usr
/
local
/
lib
/
vending
/
mp
/
tcn
/
node_modules
/
safe-stable-stringify
/
CHANGELOG.md
|
|---|
invalid regexp group error in browsers or environments that do not support the negative lookbehind regular expression assertion.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
undefined as circularValue option to remove circular properties from the serialized output:import { configure } from 'safe-stable-stringify' const object = { array: [] } object.circular = object; object.array.push(object) configure({ circularValue: undefined })(object) // '{"array":[null]}'
maximumBreadth option to limit stringification at a specific object or array "width" (number of properties / values)maximumDepth option to limit stringification at a specific nesting depthbigint option and set it to false.