Closed szwalkowski closed 3 years ago
Would you like to send a PR?
Ofc :) Btw I was thinking if it should be behind some configuration? Do you think would be necessary to be sure that it won't break anything for current users? Thou I was thinking about various scenarios, output should be the same for ppl - even with custom replacers. So maybe hiding that behind configuration is not needed
Can you give an example of what is not working?
Okay, it happened that we had bug in replacer. We were using in replacer Object.getOwnPropertyNames - and we saw printed not enumerable properties - while I claimed that JSON.stringify goes over those - and I was wrong - it does not. Sorry for missunderstanding.
Like errors from GOT that have properties that are not returned by Object.keys. How about using Object.getOwnPropertyNames in 'decirc' ?
And JSON.stringify do go over those properties
https://stackoverflow.com/questions/18277890/why-cant-i-see-the-keys-of-an-error-object