Bump eslint-plugin-import to avoid vulnerability in dependency
This commit is contained in:
parent
10695e6a20
commit
ed9506bbaf
1660 changed files with 67726 additions and 27926 deletions
4
node_modules/es-abstract/2020/NumberToBigInt.js
generated
vendored
4
node_modules/es-abstract/2020/NumberToBigInt.js
generated
vendored
|
|
@ -4,6 +4,7 @@ var GetIntrinsic = require('get-intrinsic');
|
|||
|
||||
var $BigInt = GetIntrinsic('%BigInt%', true);
|
||||
var $RangeError = GetIntrinsic('%RangeError%');
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsInteger = require('./IsInteger');
|
||||
|
|
@ -18,5 +19,8 @@ module.exports = function NumberToBigInt(number) {
|
|||
if (!IsInteger(number)) {
|
||||
throw new $RangeError('The number ' + number + ' cannot be converted to a BigInt because it is not an integer');
|
||||
}
|
||||
if (!$BigInt) {
|
||||
throw new $SyntaxError('BigInts are not supported in this environment');
|
||||
}
|
||||
return $BigInt(number);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue