diff --git a/index.js b/index.js index 921314f..ecf7e51 100644 --- a/index.js +++ b/index.js @@ -11,8 +11,8 @@ var replacerStack = [] function defaultOptions () { return { - depthLimit: 10, - edgesLimit: 20 + depthLimit: Number.MAX_SAFE_INTEGER, + edgesLimit: Number.MAX_SAFE_INTEGER } } diff --git a/readme.md b/readme.md index fa6efa1..47179c9 100644 --- a/readme.md +++ b/readme.md @@ -35,9 +35,10 @@ function replacer(key, value) { } // those are also defaults limits when no options object is passed into safeStringify +// configure it to lower the limit. const options = { - depthLimit: 10, - edgesLimit: 20, + depthLimit: Number.MAX_SAFE_INTEGER, + edgesLimit: Number.MAX_SAFE_INTEGER }; const serialized = safeStringify(o, replacer, 2, options) @@ -166,4 +167,4 @@ MIT [`space`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20space%20argument [`toJSON`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior [benchmark]: https://github.com/epoberezkin/fast-json-stable-stringify/blob/67f688f7441010cfef91a6147280cc501701e83b/benchmark -[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify \ No newline at end of file +[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify