mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS: Add JSON.stringify
This commit is contained in:
committed by
Andreas Kling
parent
b4577ffcf3
commit
39576b2238
Notes:
sideshowbarker
2024-07-19 05:40:49 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/39576b22385 Pull-request: https://github.com/SerenityOS/serenity/pull/2545 Reviewed-by: https://github.com/Dexesttp Reviewed-by: https://github.com/awesomekling
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user