Socket
Socket
Sign inDemoInstall

safe-stable-stringify

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2Next

2.4.3

Diff

bridgear
published 2.4.2 •

Changelog

Source

v2.4.2

  • Improved ESM TypeScript types.
  • More precise TypeScript replacer type.
bridgear
published 2.4.1 •

bridgear
published 2.4.0 •

bridgear
published 2.3.1 •

bridgear
published 2.3.0 •

Changelog

Source

v2.3.0

  • Accept the 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
  • Fixed escaping wrong surrogates. Only lone surrogates are now escaped.
bridgear
published 2.2.0 •

bridgear
published 2.1.0 •

bridgear
published 2.0.0 •

Changelog

Source

v2.0.0

  • [BREAKING] Convert BigInt to number by default instead of ignoring these values If you wish to ignore these values similar to earlier versions, just use the new bigint option and set it to false.
  • [BREAKING] Support ESM
  • [BREAKING] Requires ES6
  • Optional BigInt support
  • Deterministic behavior is now optional
  • The value to indicate a circular structure is now adjustable
  • Significantly faster TypedArray stringification
  • Smaller Codebase
  • Removed stateful indentation to guarantee side-effect freeness
bridgear
published 1.1.1 •

2Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc