Frontend/25_01_07/mai/node_modules/es-abstract/2023/IsStrictlyEqual.js
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

15 lines
392 B
JavaScript

'use strict';
var SameValueNonNumber = require('./SameValueNonNumber');
var Type = require('./Type');
var NumberEqual = require('./Number/equal');
// https://262.ecma-international.org/14.0/#sec-isstrictlyequal
module.exports = function IsStrictlyEqual(x, y) {
if (Type(x) !== Type(y)) {
return false;
}
return typeof x === 'number' ? NumberEqual(x, y) : SameValueNonNumber(x, y);
};