1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:17:44 +00:00

LibJS: Add Value::is_nullish()

This commit is contained in:
Andreas Kling 2020-10-02 16:00:15 +02:00
parent ef1b21004f
commit fa18baf3e8
9 changed files with 22 additions and 21 deletions

View file

@ -71,6 +71,7 @@ public:
bool is_accessor() const { return m_type == Type::Accessor; };
bool is_bigint() const { return m_type == Type::BigInt; };
bool is_native_property() const { return m_type == Type::NativeProperty; }
bool is_nullish() const { return is_null() || is_undefined(); }
bool is_cell() const { return is_string() || is_accessor() || is_object() || is_bigint() || is_symbol() || is_native_property(); }
bool is_array() const;
bool is_function() const;