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
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var SameValueNonNumeric = require('./SameValueNonNumeric');
|
---|
4 | var Type = require('./Type');
|
---|
5 | var BigIntEqual = require('./BigInt/equal');
|
---|
6 | var NumberEqual = require('./Number/equal');
|
---|
7 |
|
---|
8 | // https://262.ecma-international.org/13.0/#sec-isstrictlyequal
|
---|
9 |
|
---|
10 | module.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.