Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
8
node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.js
generated
vendored
8
node_modules/es-abstract/2022/ApplyStringOrNumericBinaryOperator.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 HasOwnProperty = require('./HasOwnProperty');
|
||||
var ToNumeric = require('./ToNumeric');
|
||||
|
|
@ -54,13 +52,13 @@ var table = {
|
|||
};
|
||||
|
||||
module.exports = function ApplyStringOrNumericBinaryOperator(lval, opText, rval) {
|
||||
if (Type(opText) !== 'String' || !HasOwnProperty(table, opText)) {
|
||||
if (typeof opText !== 'string' || !HasOwnProperty(table, opText)) {
|
||||
throw new $TypeError('Assertion failed: `opText` must be a valid operation string');
|
||||
}
|
||||
if (opText === '+') {
|
||||
var lprim = ToPrimitive(lval);
|
||||
var rprim = ToPrimitive(rval);
|
||||
if (Type(lprim) === 'String' || Type(rprim) === 'String') {
|
||||
if (typeof lprim === 'string' || typeof rprim === 'string') {
|
||||
var lstr = ToString(lprim);
|
||||
var rstr = ToString(rprim);
|
||||
return lstr + rstr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue