You can look at how String is created, here:
https://github.com/jasonwilliams/boa/blob/master/src/lib/js/string.rs
boolean
https://github.com/jasonwilliams/boa/blob/master/src/lib/js/boolean.rs
Its then added to the global scope here:
https://github.com/jasonwilliams/boa/blob/master/src/lib/exec.rs#L36
This sounds cool and I'm interested in contributing to Boa for Hacktoberfest. Mind if I start working on this?
@pop assigned
@jasonwilliams I've got most of the skeleton code up on my fork of boa ([HERE]).
I'm not sure what you mean by how we should add the new Number object to the global scope.
There already seems to be some kind of Number in boa, but not a proper Number object.
Any hints?
@pop sorry i thought i replied to this.
We add Globals here:https://github.com/jasonwilliams/boa/blob/master/src/lib/realm.rs#L58-L65
So just look at how the others work