lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.01k stars 43 forks source link

Optional auto-folding of nested objects #531

Closed alcovegan closed 1 year ago

alcovegan commented 1 year ago

Hello.

Today I installed the latest version of RunJS and, according to the changelog, now nested objects are auto-folded. Can this be made optional? Sometimes I need to convert data from one structure to another, and this is very inconvenient when every time the code changes, the objects have to be unwrapped back.

Thank you.

lukehaas commented 1 year ago

Thanks, @alcovegan. Happy to consider adding this as an option if this is popular.

Bear in mind that you do also have the option to use console.table and also JSON.stringify, which may be better options for you when working with deeply nested objects.

didaquis commented 1 year ago

In my opinion, I also think it would be interesting to make this behavior optional.

lukehaas commented 1 year ago

@alcovegan The latest release has an update for this. Nested objects are no longer auto-folded, now, only __proto__ properties are auto-folded.