* Fixed compilation without "wasm-bindgen" feature
* updating clippy rules on all files (#238)
* Fixed compilation without "wasm-bindgen" feature
Co-authored-by: Jason Williams <936006+jasonwilliams@users.noreply.github.com>
* feat: Implement Array.prototype.toString
* fix: fix the missing arguments for Array.prototype.toString's inner join
* refactor: use fmt to beautify the code
* refactor: Array.prototype.toString——smplify error formating
* fix: Array.prototype.toString should be called by ES value
* fix: fix the error message
* refactor: Array.prototype.toString remove the duplicated logic
* Added the initial re-implementation of Display for Objects
* Added internal object slots printing
* Used INSTANCE_PROTOTYPE instead of "__proto__"
* Updated TODO comment
* rustfmt
* Fixed clippy and unit tests
* WIP: Added a working prototype for detecting cycles
* Refactored the object printing logic
* Reverted test.js
* Fixed print identation
* rustfmt
* Added printing for the internal_slots
* Fixed missing comma between internal slots & props when printing
* Clippy
* Implemented a macro for printing objects & refactored
* Used display_obj in console.log
* rustfmt
* Fixed String & Array prototypes length not being set
* Extracted common logic in a function
* Commented out problematic lines in `concat`
* rustfmt
* Refactored console.rs & value.rs
* Fixed log_string_from looking for wrong string slot
* Reverted commented test
* Removed Array & String prototype lengths' getters
* Removed unused functions
* rustfmt
* Add make_fn macro in builtins module
* Replace all array methods with the make_fn macro
* Set builtins method with make_fn for bool, console, error, json, math, number, object, regexp and string
* Rename make_fn macro to make_builtin_fn
* Rename the actual macro rule to make_builtin_fn
* make_builtin_fn macro without length will result to length 0
* Add length property for every builtin method
* Remove duplicate definition of toString method in regexp
* Add missing length attributes to builtins methods
* Added the initial implementation for Array.prototype.map
* Removed unneccessary .to_string()
* Fixed clippy errors
* Fixed old array being modified by `map`
* rustfmt
* Refactored `map` to use iter().map()
* Refactored array.prototype.map
* Feature(Number): Tests for the Test Driven Development!
refs #34
* Feature: Skeleton code for Number
refs #34
* Feature: Most of Number() is complete
Includes:
- make_number()
- call_number()
- Number().toExponential()
- Number().toFixed()
- Number().toLocaleString() (ish)
- Number().toString()
- Number().valueOf()
- create_constructor()
- init()
Missing:
- Number().toPrecision()
refs #34
* Feature(Number): test compatability with const -> var
I don't have all the context on _why_ but all of the tests for `Number` started failing.
Upon investigation it was becuase `const` stopped acting the way I expected.
Switching my test cases from using `const` to using `var` variable declarations
made everything work again. I don't know enough about JS to know if this is a
bug or expected behavior. Based on changes to other tests, it is know
behavior.
Refs #34
* Changelog: Number() object.
Includes some clippy fixes.
Fixes#34
* Array.prototype.fill method implementation
* Added types
* Fmt changes
* Fill tests fixed - let to var change
* Added support for string arguments
* Formatting
* Replaced set_field_slice with set_field
* Parse args to int change
* More tests and bug fixes
* Removed print
* Removed unnecessary else block
* Calling function to get ValueData::Undefined in GC
* Fmt update
* Function length prop, variable name change, and one more test
* Removed duplicated test case