In looking at an object created by a javascript library in observable, I get this output:
g = x {obj: m, attr: "min_width", default_value: ƒ(), optional: false, change: c, spec: Object}
What is the x
in front telling me?
In looking at an object created by a javascript library in observable, I get this output:
g = x {obj: m, attr: "min_width", default_value: ƒ(), optional: false, change: c, spec: Object}
What is the x
in front telling me?
It’s the name of the constructor for that object.
For example, if you have:
class Foo {}
f = new Foo
You’ll see:
f = ▸ Foo {}
If you’re using a JavaScript library published to npm, the constructor names are often minified, which explains why you might see a nondescriptive name such as “x”.
Incidentally I loaded the non-minified version of the library (which was also available from the cdn) and now I can see what’s going on much more clearly.