Provided you have something like:
const o = { str: 'String' };
o;
the output would be:
"{ str: String }"
The issue is due to the implementation of Display for ValueData::String, which simply displays the value of the String.
Note that currently in
masterobjects are displayed simpy as{}but you can see the issue in the branch for #171.
The change would be made here:
https://github.com/jasonwilliams/boa/blob/master/boa/src/builtins/value/mod.rs#L797-L850
It would just be replacing the string used in https://github.com/jasonwilliams/boa/blob/f02babf0bd254b37920206b0ce0089bb9b01ba50/boa/src/builtins/value/mod.rs#L841
from write!(f, "{}", v) to write!(f, "\"{}\"", v), right?
@RageKnify i think so yup
I'll open a PR soon.
Most helpful comment
I'll open a PR soon.