source: imaps-frontend/node_modules/es-abstract/2022/IsStrictlyEqual.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • 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.