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:
392 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var SameValueNonNumber = require('./SameValueNonNumber');
|
---|
| 4 | var Type = require('./Type');
|
---|
| 5 | var NumberEqual = require('./Number/equal');
|
---|
| 6 |
|
---|
| 7 | // https://262.ecma-international.org/14.0/#sec-isstrictlyequal
|
---|
| 8 |
|
---|
| 9 | module.exports = function IsStrictlyEqual(x, y) {
|
---|
[79a0317] | 10 | if (Type(x) !== Type(y)) {
|
---|
[d565449] | 11 | return false;
|
---|
| 12 | }
|
---|
[79a0317] | 13 | return typeof x === 'number' ? NumberEqual(x, y) : SameValueNonNumber(x, y);
|
---|
[d565449] | 14 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.