source: imaps-frontend/node_modules/es-abstract/2024/SameValueNonNumber.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 551 bytes
Line 
1'use strict';
2
3var $TypeError = require('es-errors/type');
4
5var SameValue = require('./SameValue');
6var Type = require('./Type');
7
8// https://262.ecma-international.org/14.0/#sec-samevaluenonnumeric
9
10module.exports = function SameValueNonNumber(x, y) {
11 var xType = Type(x);
12 if (xType === 'Number') {
13 throw new $TypeError('Assertion failed: SameValueNonNumber does not accept Number values');
14 }
15 if (xType !== Type(y)) {
16 throw new $TypeError('SameValueNonNumber requires two non-Number values of the same type.');
17 }
18 return SameValue(x, y);
19};
Note: See TracBrowser for help on using the repository browser.