* added builtin globalThis
* forgot to initialize globalThis in the builtin mod.rs file
* changed to to match naming conventions and fixed issue with suggested edits to globalThis' initial value
* updated the test for the property as suggested
* remove From<JSONValue> for Value. Going from JSONValue to Value will soon need the interpreter
* pass interpreter to from_json
* move from_json to Value impl
* move to_json to Value impl alongside from_json
* add prototype to objects created from json
* consume the object and don't clone
* if it fits into i32, use integer; otherwise, use a rational
* WIP: throwing type error
* address most of the error cases
* cargo fmt
* address the rest of the error cases
* return null when JSONNumber::from_f64() returns None
* cargo fmt
* Update boa/src/builtins/value/mod.rs
* use JSONValue and use Result
* Update boa/src/builtins/json/mod.rs
Use and_then to avoid flatten
Co-authored-by: HalidOdat <halidodat@gmail.com>
Co-authored-by: Iban Eguia <razican@protonmail.ch>
Co-authored-by: HalidOdat <halidodat@gmail.com>
* Added documentation to make_builtin_fn
* Simple impl of parseInt()
* Impl rest of parse_int
* Fixed handling of strings starting 0x
* Made NaN return as per js spec
* Rework to improve clarity
* parseFloat impl, added tests
* Addressed comments to PR
* Removed f64 import
* Fixed handling of too many/few arguments to parseInt/Float
Co-authored-by: HalidOdat <halidodat@gmail.com>
Tries to make the README.md file more consistent. In some places the lines ended with a ".", while in others it did not. The licenses at the ended were missing some links and some sessions, such as [Benchmark] did not have any text besides the main link, among other things.
- Maded arrow functions non-constructable
- Simplified Function object and removed FunctionKind
- Rnamed create_ordinary -> ordinary, create_builtin -> builtin
- Added name and length properties in global objects