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

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
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&);