source: frontend/node_modules/es-abstract/2022/IsStrictlyEqual.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 526 bytes
Line 
1'use strict';
2
3var SameValueNonNumeric = require('./SameValueNonNumeric');
4var Type = require('./Type');
5var BigIntEqual = require('./BigInt/equal');
6var NumberEqual = require('./Number/equal');
7
8// https://262.ecma-international.org/13.0/#sec-isstrictlyequal
9
10module.exports = function IsStrictlyEqual(x, y) {
11 if (Type(x) !== Type(y)) {
12 return false;
13 }
14 if (typeof x === 'number' || typeof x === 'bigint') {
15 return typeof x === 'number' ? NumberEqual(x, y) : BigIntEqual(x, y);
16 }
17 return SameValueNonNumeric(x, y);
18};
Note: See TracBrowser for help on using the repository browser.