This commit is contained in:
2024-11-03 17:16:20 +01:00
commit fd6412d6f2
8090 changed files with 778406 additions and 0 deletions

14
node_modules/es-abstract/2021/BigInt/add.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};

14
node_modules/es-abstract/2021/BigInt/bitwiseAND.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
module.exports = function BigIntBitwiseAND(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('&', x, y);
};

15
node_modules/es-abstract/2021/BigInt/bitwiseNOT.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
module.exports = function BigIntBitwiseNOT(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
return -x - $BigInt(1);
};

14
node_modules/es-abstract/2021/BigInt/bitwiseOR.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
module.exports = function BigIntBitwiseOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('|', x, y);
};

14
node_modules/es-abstract/2021/BigInt/bitwiseXOR.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
module.exports = function BigIntBitwiseXOR(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntBitwiseOp('^', x, y);
};

20
node_modules/es-abstract/2021/BigInt/divide.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
module.exports = function BigIntDivide(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
if (y === $BigInt(0)) {
throw new $RangeError('Division by zero');
}
// shortcut for the actual spec mechanics
return x / y;
};

13
node_modules/es-abstract/2021/BigInt/equal.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
module.exports = function BigIntEqual(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x === y;
};

29
node_modules/es-abstract/2021/BigInt/exponentiate.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
module.exports = function BigIntExponentiate(base, exponent) {
if (typeof base !== 'bigint' || typeof exponent !== 'bigint') {
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be BigInts');
}
if (exponent < $BigInt(0)) {
throw new $RangeError('Exponent must be positive');
}
if (/* base === $BigInt(0) && */ exponent === $BigInt(0)) {
return $BigInt(1);
}
var square = base;
var remaining = exponent;
while (remaining > $BigInt(0)) {
square += exponent;
--remaining; // eslint-disable-line no-plusplus
}
return square;
};

43
node_modules/es-abstract/2021/BigInt/index.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var sameValue = require('./sameValue');
var sameValueZero = require('./sameValueZero');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
sameValue: sameValue,
sameValueZero: sameValueZero,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};

14
node_modules/es-abstract/2021/BigInt/leftShift.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
module.exports = function BigIntLeftShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x << y;
};

14
node_modules/es-abstract/2021/BigInt/lessThan.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
module.exports = function BigIntLessThan(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x < y;
};

14
node_modules/es-abstract/2021/BigInt/multiply.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
module.exports = function BigIntMultiply(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x * y;
};

28
node_modules/es-abstract/2021/BigInt/remainder.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = require('es-errors/range');
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
module.exports = function BigIntRemainder(n, d) {
if (typeof n !== 'bigint' || typeof d !== 'bigint') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
}
if (d === zero) {
throw new $RangeError('Division by zero');
}
if (n === zero) {
return zero;
}
// shortcut for the actual spec mechanics
return n % d;
};

15
node_modules/es-abstract/2021/BigInt/sameValue.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
var $TypeError = require('es-errors/type');
var BigIntEqual = require('./equal');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue
module.exports = function BigIntSameValue(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntEqual(x, y);
};

15
node_modules/es-abstract/2021/BigInt/sameValueZero.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
'use strict';
var $TypeError = require('es-errors/type');
var BigIntEqual = require('./equal');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero
module.exports = function BigIntSameValueZero(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntEqual(x, y);
};

View File

@@ -0,0 +1,15 @@
'use strict';
var $TypeError = require('es-errors/type');
var BigIntLeftShift = require('./leftShift');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
module.exports = function BigIntSignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
return BigIntLeftShift(x, -y);
};

14
node_modules/es-abstract/2021/BigInt/subtract.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
module.exports = function BigIntSubtract(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x - y;
};

16
node_modules/es-abstract/2021/BigInt/toString.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring
module.exports = function BigIntToString(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` must be a BigInt');
}
return $String(x);
};

22
node_modules/es-abstract/2021/BigInt/unaryMinus.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = require('es-errors/type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
module.exports = function BigIntUnaryMinus(x) {
if (typeof x !== 'bigint') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
if (x === zero) {
return zero;
}
return -x;
};

View File

@@ -0,0 +1,13 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
module.exports = function BigIntUnsignedRightShift(x, y) {
if (typeof x !== 'bigint' || typeof y !== 'bigint') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
throw new $TypeError('BigInts have no unsigned right shift, use >> instead');
};