This commit is contained in:
szabomarton
2025-01-28 11:38:27 +01:00
parent 9c5ca86086
commit 7f4a15b9c3
36841 changed files with 4032468 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
'use strict';
var SameValueNonNumeric = require('./SameValueNonNumeric');
var Type = require('./Type');
var BigIntEqual = require('./BigInt/equal');
var NumberEqual = require('./Number/equal');
// https://262.ecma-international.org/13.0/#sec-isstrictlyequal
module.exports = function IsStrictlyEqual(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
if (typeof x === 'number' || typeof x === 'bigint') {
return typeof x === 'number' ? NumberEqual(x, y) : BigIntEqual(x, y);
}
return SameValueNonNumeric(x, y);
};