debitoor / safe-json-stringify

A wrapper for JSON.stringify that handles circular references and prevent defined getters from throwing errors.
https://www.npmjs.com/package/safe-json-stringify
56 stars 16 forks source link

Make JSON.stringify's formatting and replacing capabilities available. #4

Closed thirtified closed 6 years ago

thirtified commented 7 years ago

safe-json-stringify currently doesn't support the formatting and replacement functions that JSON.stringify provides. Since the module uses JSON.stringify for the actual serialization, it is easy to accept and proxy the missing parameters.

Also added tests and a remark in the docs.

ath88 commented 6 years ago

@thirtified Did you forget about this PR? I would very much like this functionality too. :)

thirtified commented 6 years ago

@ath88 – I really did forget, sorry.

Removed the unneccessary comments and merging, yay 👍.