Initial commit
This commit is contained in:
		
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/add.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/add.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntAdd(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// shortcut for the actual spec mechanics
 | 
			
		||||
	return x + y;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseAND.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseAND.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseAND
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntBitwiseAND(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
	return BigIntBitwiseOp('&', x, y);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseNOT.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseNOT.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $BigInt = GetIntrinsic('%BigInt%', true);
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntBitwiseNOT(x) {
 | 
			
		||||
	if (Type(x) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
 | 
			
		||||
	}
 | 
			
		||||
	return -x - $BigInt(1);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseOR.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseOR.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseOR
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntBitwiseOR(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
	return BigIntBitwiseOp('|', x, y);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseXOR.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/bitwiseXOR.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var BigIntBitwiseOp = require('../BigIntBitwiseOp');
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseXOR
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntBitwiseXOR(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
	return BigIntBitwiseOp('^', x, y);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										22
									
								
								node_modules/es-abstract/2020/BigInt/divide.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								node_modules/es-abstract/2020/BigInt/divide.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $BigInt = GetIntrinsic('%BigInt%', true);
 | 
			
		||||
var $RangeError = GetIntrinsic('%RangeError%');
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-divide
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntDivide(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(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;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/equal.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/equal.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-equal
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntEqual(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
	// shortcut for the actual spec mechanics
 | 
			
		||||
	return x === y;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										31
									
								
								node_modules/es-abstract/2020/BigInt/exponentiate.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								node_modules/es-abstract/2020/BigInt/exponentiate.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $BigInt = GetIntrinsic('%BigInt%', true);
 | 
			
		||||
var $RangeError = GetIntrinsic('%RangeError%');
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-exponentiate
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntExponentiate(base, exponent) {
 | 
			
		||||
	if (Type(base) !== 'BigInt' || Type(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/2020/BigInt/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								node_modules/es-abstract/2020/BigInt/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal 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
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/leftShift.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/leftShift.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-leftShift
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntLeftShift(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// shortcut for the actual spec mechanics
 | 
			
		||||
	return x << y;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/lessThan.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/lessThan.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-lessThan
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntLessThan(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// shortcut for the actual spec mechanics
 | 
			
		||||
	return x < y;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/multiply.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/multiply.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-multiply
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntMultiply(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// shortcut for the actual spec mechanics
 | 
			
		||||
	return x * y;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										30
									
								
								node_modules/es-abstract/2020/BigInt/remainder.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								node_modules/es-abstract/2020/BigInt/remainder.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $BigInt = GetIntrinsic('%BigInt%', true);
 | 
			
		||||
var $RangeError = GetIntrinsic('%RangeError%');
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../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 (Type(n) !== 'BigInt' || Type(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;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/sameValue.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/sameValue.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
var BigIntEqual = require('./equal');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntSameValue(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return BigIntEqual(x, y);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/sameValueZero.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/sameValueZero.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
var BigIntEqual = require('./equal');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntSameValueZero(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return BigIntEqual(x, y);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/signedRightShift.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/signedRightShift.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
var BigIntLeftShift = require('./leftShift');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-signedRightShift
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntSignedRightShift(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return BigIntLeftShift(x, -y);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/subtract.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/subtract.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-subtract
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntSubtract(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// shortcut for the actual spec mechanics
 | 
			
		||||
	return x - y;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/toString.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								node_modules/es-abstract/2020/BigInt/toString.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $String = GetIntrinsic('%String%');
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-tostring
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntToString(x) {
 | 
			
		||||
	if (Type(x) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` must be a BigInt');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return $String(x);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										24
									
								
								node_modules/es-abstract/2020/BigInt/unaryMinus.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								node_modules/es-abstract/2020/BigInt/unaryMinus.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $BigInt = GetIntrinsic('%BigInt%', true);
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
var zero = $BigInt && $BigInt(0);
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unaryMinus
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntUnaryMinus(x) {
 | 
			
		||||
	if (Type(x) !== 'BigInt') {
 | 
			
		||||
		throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (x === zero) {
 | 
			
		||||
		return zero;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return -x;
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/unsignedRightShift.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/es-abstract/2020/BigInt/unsignedRightShift.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
var GetIntrinsic = require('get-intrinsic');
 | 
			
		||||
 | 
			
		||||
var $TypeError = GetIntrinsic('%TypeError%');
 | 
			
		||||
 | 
			
		||||
var Type = require('../Type');
 | 
			
		||||
 | 
			
		||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-unsignedRightShift
 | 
			
		||||
 | 
			
		||||
module.exports = function BigIntUnsignedRightShift(x, y) {
 | 
			
		||||
	if (Type(x) !== 'BigInt' || Type(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');
 | 
			
		||||
};
 | 
			
		||||
		Reference in New Issue
	
	Block a user