safe-json-stringify
safe-json-stringify copied to clipboard
A wrapper for JSON.stringify that handles circular references and prevent defined getters from throwing errors.
I ran into issues using https://github.com/trentm/node-bunyan which makes use of this library. This PR simply converts BigInts to strings, which I think is reasonable because ``` > BigInt('11111111111111111111111111111111111'); 11111111111111111111111111111111111n ```...
Sometimes your function still throws me this error `Object doesn't support property or method 'error'` No idea what arguments have been used (form my production site with lots of visits)...
Simply `const safeJsonStringify = require('safe-json-stringify');` doesn't work in Angular 4. Because we have import statements in Angular 2, 4+ vesrion. `require()` is not supported any more. If `stringify` is exported...