babel-plugin-transform-bigint
Advanced tools
Comparing version 1.0.25 to 1.0.26
11
index.js
@@ -578,3 +578,12 @@ // see https://github.com/babel/babel/pull/6015 | ||
AssignmentExpression: function (path, state) { | ||
throw new RangeError('AssignmentExpressions are not supported because of the complexity: ' + path); | ||
const JSBI = canBeBigInt(path); | ||
if (JSBI !== false) { | ||
const operator = path.node.operator; | ||
if (operator.endsWith('=')) { | ||
const functionName = getFunctionName(operator.slice(0, -'='.length)); | ||
if (functionName != null) { | ||
throw new RangeError('AssignmentExpressions are not supported because of the complexity: ' + path); | ||
} | ||
} | ||
} | ||
/* | ||
@@ -581,0 +590,0 @@ const isConstant = function (path) { |
{ | ||
"name": "babel-plugin-transform-bigint", | ||
"version": "1.0.25", | ||
"version": "1.0.26", | ||
"description": "A plugin for babel to transform `x * y` into something like `JSBI.multiply(x, y)` to support bigints.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
54350
939