mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-28 15:05:18 +08:00
15 lines
402 B
JavaScript
15 lines
402 B
JavaScript
|
|
'use strict';
|
||
|
|
|
||
|
|
var $TypeError = require('es-errors/type');
|
||
|
|
|
||
|
|
var SameValue = require('./SameValue');
|
||
|
|
|
||
|
|
// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber
|
||
|
|
|
||
|
|
module.exports = function SameValueNonNumber(x, y) {
|
||
|
|
if (typeof x === 'number' || typeof x !== typeof y) {
|
||
|
|
throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.');
|
||
|
|
}
|
||
|
|
return SameValue(x, y);
|
||
|
|
};
|