ags
This commit is contained in:
parent
eddf7cecb8
commit
aea798d119
16631 changed files with 1480363 additions and 257 deletions
18
home/ags/node_modules/es-abstract/2020/SameValueNonNumeric.js
generated
vendored
Normal file
18
home/ags/node_modules/es-abstract/2020/SameValueNonNumeric.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var SameValue = require('./SameValue');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric
|
||||
|
||||
module.exports = function SameValueNonNumeric(x, y) {
|
||||
if (typeof x === 'number' || typeof x === 'bigint') {
|
||||
throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values');
|
||||
}
|
||||
if (Type(x) !== Type(y)) {
|
||||
throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.');
|
||||
}
|
||||
return SameValue(x, y);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue