mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:47:44 +00:00
LibJS: Add JSON.stringify
This commit is contained in:
parent
b4577ffcf3
commit
39576b2238
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