QuantumQ
Denoβ€’3y agoβ€’
3 replies
Quantum

Is there a built-in parser for the string that Deno.inspect produces?

I found out in another thread that Deno.inspect(myObj) produces a visually gorgeous string representation of objects and can represent internal data structures that JSON.stringify fails to represent.

(Thank you @cknight for helping me with that!)

My next question is, does Deno happen to have the analog of JSON.parse for what gets output by Deno.inspect? Can we take the Deno.inspect output and turn it back into what would become a clone of the original object?

(To be clear: I am not asking if JSON.parse will do this. I am asking if there is a nifty Deno function that does it.)
Was this page helpful?