aswi2020vldc-gitlab/templetes/node_modules/es-abstract/2018/SameValueNonNumber.js @ 56f6c6df
1 |
'use strict'; |
---|---|
2 |
|
3 |
var GetIntrinsic = require('../GetIntrinsic'); |
4 |
|
5 |
var $TypeError = GetIntrinsic('%TypeError%'); |
6 |
|
7 |
var SameValue = require('./SameValue'); |
8 |
|
9 |
// https://www.ecma-international.org/ecma-262/7.0/#sec-samevaluenonnumber
|
10 |
|
11 |
module.exports = function SameValueNonNumber(x, y) { |
12 |
if (typeof x === 'number' || typeof x !== typeof y) { |
13 |
throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.'); |
14 |
}
|
15 |
return SameValue(x, y); |
16 |
};
|