File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ var replacerStack = []
1111
1212function defaultOptions ( ) {
1313 return {
14- depthLimit : 10 ,
15- edgesLimit : 20
14+ depthLimit : Number . MAX_SAFE_INTEGER ,
15+ edgesLimit : Number . MAX_SAFE_INTEGER
1616 }
1717}
1818
Original file line number Diff line number Diff line change @@ -35,9 +35,10 @@ function replacer(key, value) {
3535}
3636
3737// those are also defaults limits when no options object is passed into safeStringify
38+ // configure it to lower the limit.
3839const options = {
39- depthLimit: 10 ,
40- edgesLimit: 20 ,
40+ depthLimit: Number . MAX_SAFE_INTEGER ,
41+ edgesLimit: Number . MAX_SAFE_INTEGER
4142};
4243
4344const serialized = safeStringify (o, replacer, 2 , options)
166167[ `space` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20space%20argument
167168[ `toJSON` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior
168169[ benchmark ] : https://github.com/epoberezkin/fast-json-stable-stringify/blob/67f688f7441010cfef91a6147280cc501701e83b/benchmark
169- [ JSON.stringify ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
170+ [ JSON.stringify ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
You can’t perform that action at this time.
0 commit comments