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

Fix detection of circular references as opposed to object identity #7

Closed MikeRalphson closed 6 years ago

MikeRalphson commented 6 years ago

The seen stack is now popped as we leave each property, thus only identical objects within a property will flag the circular reference detection, as opposed to any sighting of the same object anywhere in the graph.

eagleeye commented 6 years ago

Thanks, @MikeRalphson, landed as v1.2.0!