LibJS: Implement Object.is()

Basically === with two particularities: comparing NaN to itself is
considered equal and comparing +0 and -0 is not.
This commit is contained in:
Linus Groh
2020-04-26 00:27:54 +01:00
committed by Andreas Kling
parent f191b84b50
commit 38ba13e912
Notes: sideshowbarker 2024-07-19 07:17:14 +09:00
4 changed files with 73 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ private:
virtual const char* class_name() const override { return "ObjectConstructor"; }
static Value define_property(Interpreter&);
static Value is(Interpreter&);
static Value get_own_property_descriptor(Interpreter&);
static Value get_own_property_names(Interpreter&);
static Value get_prototype_of(Interpreter&);