Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
9
node_modules/es-abstract/2021/SameValueNonNumeric.js
generated
vendored
9
node_modules/es-abstract/2021/SameValueNonNumeric.js
generated
vendored
|
|
@ -1,8 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var SameValue = require('./SameValue');
|
||||
var Type = require('./Type');
|
||||
|
|
@ -10,11 +8,10 @@ var Type = require('./Type');
|
|||
// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric
|
||||
|
||||
module.exports = function SameValueNonNumeric(x, y) {
|
||||
var xType = Type(x);
|
||||
if (xType === 'Number' || xType === 'BigInt') {
|
||||
if (typeof x === 'number' || typeof x === 'bigint') {
|
||||
throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values');
|
||||
}
|
||||
if (xType !== Type(y)) {
|
||||
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