babel-plugin-transform-numeric-separator
Advanced tools
Comparing version 7.0.0-alpha.12 to 7.0.0-alpha.14
@@ -5,3 +5,4 @@ "use strict"; | ||
exports.default = function () { | ||
exports.default = function (_ref) { | ||
var t = _ref.types; | ||
@@ -12,8 +13,13 @@ function replacer(value) { | ||
function replaceNumberArg(_ref) { | ||
var node = _ref.node; | ||
function replaceNumberArg(_ref2) { | ||
var node = _ref2.node; | ||
if (node.callee.name === "Number") { | ||
node.arguments[0].value = replacer(node.arguments[0].value); | ||
if (node.callee.name !== "Number") { | ||
return; | ||
} | ||
var arg = node.arguments[0]; | ||
if (!t.isStringLiteral(arg)) { | ||
return; | ||
} | ||
arg.value = replacer(arg.value); | ||
} | ||
@@ -30,4 +36,4 @@ | ||
NewExpression: NewExpression, | ||
NumericLiteral: function NumericLiteral(_ref2) { | ||
var node = _ref2.node; | ||
NumericLiteral: function NumericLiteral(_ref3) { | ||
var node = _ref3.node; | ||
@@ -34,0 +40,0 @@ if (node.extra && /_/.test(node.extra.raw)) { |
{ | ||
"name": "babel-plugin-transform-numeric-separator", | ||
"version": "7.0.0-alpha.12", | ||
"version": "7.0.0-alpha.14", | ||
"description": "Remove numeric separators from Decimal, Binary, Hex and Octal literals", | ||
@@ -12,7 +12,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-numeric-separator", | ||
"dependencies": { | ||
"babel-plugin-syntax-numeric-separator": "7.0.0-alpha.12" | ||
"babel-plugin-syntax-numeric-separator": "7.0.0-alpha.14" | ||
}, | ||
"devDependencies": { | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.12" | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.14" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4285
36
+ Addedbabel-plugin-syntax-numeric-separator@7.0.0-alpha.14(transitive)
- Removedbabel-plugin-syntax-numeric-separator@7.0.0-alpha.12(transitive)