LibJS: Add Value::is_array()

This commit is contained in:
Andreas Kling 2020-03-26 12:02:18 +01:00
commit d7073b9f3e
Notes: sideshowbarker 2024-07-19 08:07:12 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -33,6 +33,11 @@
namespace JS {
bool Value::is_array() const
{
return is_object() && as_object()->is_array();
}
String Value::to_string() const
{
if (is_boolean())