Persper / js-callgraph

Construct approximate static call graph for JavaScript & Typescript
Eclipse Public License 2.0
182 stars 54 forks source link

Fix invalid string length error in JSON.stringify when handling big projects #60

Open icemonster opened 3 years ago

icemonster commented 3 years ago

This fixes memory and invalid string length errors in JSON.stringify when dumping the CG as a JSON.

Adapted this solution: https://dev.to/madhunimmo/json-stringify-rangeerror-invalid-string-length-3977 as it fits very well in our use case, as our JSON object is a simple array of (possibly many) short objects.