You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SameValueNonNumber.js 461B

12345678910111213141516
  1. 'use strict';
  2. var GetIntrinsic = require('../GetIntrinsic');
  3. var $TypeError = GetIntrinsic('%TypeError%');
  4. var SameValue = require('./SameValue');
  5. // https://www.ecma-international.org/ecma-262/7.0/#sec-samevaluenonnumber
  6. module.exports = function SameValueNonNumber(x, y) {
  7. if (typeof x === 'number' || typeof x !== typeof y) {
  8. throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.');
  9. }
  10. return SameValue(x, y);
  11. };