pub fn to_object(v: &Value) -> ValueExpand description
ToObject(v) (7.1.18) for a primitive: the wrapper object with the matching
prototype and a [[StringData]]/[[NumberData]]/[[BooleanData]] slot.
A String wrapper also owns its index properties and length, which is what
makes w[0], w.length and Object.keys(w) answer; all of them are
non-writable and non-configurable, as the exotic String object’s are.