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:
318 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var Type = require('./Type');
|
---|
| 4 |
|
---|
| 5 | // https://262.ecma-international.org/5.1/#sec-11.9.6
|
---|
| 6 |
|
---|
| 7 | module.exports = function StrictEqualityComparison(x, y) {
|
---|
[79a0317] | 8 | if (Type(x) !== Type(y)) {
|
---|
[d565449] | 9 | return false;
|
---|
| 10 | }
|
---|
[79a0317] | 11 | if (typeof x === 'undefined' || x === null) {
|
---|
[d565449] | 12 | return true;
|
---|
| 13 | }
|
---|
| 14 | return x === y; // shortcut for steps 4-7
|
---|
| 15 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.