mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibJS: Add JSON.stringify
This commit is contained in:
parent
b4577ffcf3
commit
39576b2238
Notes:
sideshowbarker
2024-07-19 05:40:49 +09:00
Author: https://github.com/mattco98
Commit: 39576b2238
Pull-request: https://github.com/SerenityOS/serenity/pull/2545
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/awesomekling
19 changed files with 678 additions and 10 deletions
|
@ -81,10 +81,7 @@ Value ArrayConstructor::construct(Interpreter& interpreter)
|
|||
Value ArrayConstructor::is_array(Interpreter& interpreter)
|
||||
{
|
||||
auto value = interpreter.argument(0);
|
||||
if (!value.is_array())
|
||||
return Value(false);
|
||||
// Exclude TypedArray and similar
|
||||
return Value(StringView(value.as_object().class_name()) == "Array");
|
||||
return Value(value.is_array());
|
||||
}
|
||||
|
||||
Value ArrayConstructor::of(Interpreter& interpreter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue