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

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 557 bytes
RevLine 
[d565449]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 var xType = Type(x);
12 var yType = Type(y);
13 if (xType !== yType) {
14 return false;
15 }
16 if (xType === 'Number' || xType === 'BigInt') {
17 return xType === 'Number' ? NumberEqual(x, y) : BigIntEqual(x, y);
18 }
19 return SameValueNonNumeric(x, y);
20};
Note: See TracBrowser for help on using the repository browser.