1.0.8 • Published 1 year ago

safe-sortedjson v1.0.8

Weekly downloads
7
License
ISC
Repository
github
Last release
1 year ago

safe-sortedjson

sortedjson, guarded against recursion and some unicode confusion.

API

This module exports one function:

safeSortedJsonify(data, opts)

opts is an optional options object that supports these keys:

  • All the options from deepsortobj.
    • However, if circular is false-y (e.g. missing), it will default to a function that always returns the string '[Circular]'.
  • replacer, space: As described in sortedjson.
  • undef: What to return if (data === undefined). Default: undefined

Known issues

  • Needs more/better tests and docs.

 

License

ISC