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:
361 bytes
|
Line | |
---|
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) {
|
---|
8 | var xType = Type(x);
|
---|
9 | var yType = Type(y);
|
---|
10 | if (xType !== yType) {
|
---|
11 | return false;
|
---|
12 | }
|
---|
13 | if (xType === 'Undefined' || xType === 'Null') {
|
---|
14 | return true;
|
---|
15 | }
|
---|
16 | return x === y; // shortcut for steps 4-7
|
---|
17 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.