@babel/plugin-proposal-numeric-separator
Advanced tools
Comparing version 7.0.0-beta.42 to 7.0.0-beta.43
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _helperPluginUtils = require("@babel/helper-plugin-utils"); | ||
function _helperPluginUtils() { | ||
const data = require("@babel/helper-plugin-utils"); | ||
var _pluginSyntaxNumericSeparator = _interopRequireDefault(require("@babel/plugin-syntax-numeric-separator")); | ||
_helperPluginUtils = function () { | ||
return data; | ||
}; | ||
var _core = require("@babel/core"); | ||
return data; | ||
} | ||
function _pluginSyntaxNumericSeparator() { | ||
const data = _interopRequireDefault(require("@babel/plugin-syntax-numeric-separator")); | ||
_pluginSyntaxNumericSeparator = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _core() { | ||
const data = require("@babel/core"); | ||
_core = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _default = (0, _helperPluginUtils.declare)(function (api) { | ||
var _default = (0, _helperPluginUtils().declare)(api => { | ||
api.assertVersion(7); | ||
function replaceNumberArg(_ref) { | ||
var node = _ref.node; | ||
function replaceNumberArg({ | ||
node | ||
}) { | ||
if (node.callee.name !== "Number") { | ||
@@ -24,5 +50,5 @@ return; | ||
var arg = node.arguments[0]; | ||
const arg = node.arguments[0]; | ||
if (!_core.types.isStringLiteral(arg)) { | ||
if (!_core().types.isStringLiteral(arg)) { | ||
return; | ||
@@ -35,10 +61,14 @@ } | ||
return { | ||
inherits: _pluginSyntaxNumericSeparator.default, | ||
inherits: _pluginSyntaxNumericSeparator().default, | ||
visitor: { | ||
CallExpression: replaceNumberArg, | ||
NewExpression: replaceNumberArg, | ||
NumericLiteral: function NumericLiteral(_ref2) { | ||
var node = _ref2.node; | ||
var extra = node.extra; | ||
NumericLiteral({ | ||
node | ||
}) { | ||
const { | ||
extra | ||
} = node; | ||
if (extra && /_/.test(extra.raw)) { | ||
@@ -48,2 +78,3 @@ extra.raw = extra.raw.replace(/_/g, ""); | ||
} | ||
} | ||
@@ -50,0 +81,0 @@ }; |
{ | ||
"name": "@babel/plugin-proposal-numeric-separator", | ||
"version": "7.0.0-beta.42", | ||
"version": "7.0.0-beta.43", | ||
"description": "Remove numeric separators from Decimal, Binary, Hex and Octal literals", | ||
@@ -12,12 +12,12 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-numeric-separator", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.0.0-beta.42", | ||
"@babel/plugin-syntax-numeric-separator": "7.0.0-beta.42" | ||
"@babel/helper-plugin-utils": "7.0.0-beta.43", | ||
"@babel/plugin-syntax-numeric-separator": "7.0.0-beta.43" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "7.0.0-beta.42" | ||
"@babel/core": "7.0.0-beta.43" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.42", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.42" | ||
"@babel/core": "7.0.0-beta.43", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.43" | ||
} | ||
} |
4817
59
+ Added@babel/code-frame@7.0.0-beta.43(transitive)
+ Added@babel/core@7.0.0-beta.43(transitive)
+ Added@babel/generator@7.0.0-beta.43(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.43(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.43(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-beta.43(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.43(transitive)
+ Added@babel/helpers@7.0.0-beta.43(transitive)
+ Added@babel/highlight@7.0.0-beta.43(transitive)
+ Added@babel/plugin-syntax-numeric-separator@7.0.0-beta.43(transitive)
+ Added@babel/template@7.0.0-beta.43(transitive)
+ Added@babel/traverse@7.0.0-beta.43(transitive)
+ Added@babel/types@7.0.0-beta.43(transitive)
+ Addedbabylon@7.0.0-beta.43(transitive)
- Removed@babel/code-frame@7.0.0-beta.42(transitive)
- Removed@babel/core@7.0.0-beta.42(transitive)
- Removed@babel/generator@7.0.0-beta.42(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.42(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.42(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.42(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.42(transitive)
- Removed@babel/helpers@7.0.0-beta.42(transitive)
- Removed@babel/highlight@7.0.0-beta.42(transitive)
- Removed@babel/plugin-syntax-numeric-separator@7.0.0-beta.42(transitive)
- Removed@babel/template@7.0.0-beta.42(transitive)
- Removed@babel/traverse@7.0.0-beta.42(transitive)
- Removed@babel/types@7.0.0-beta.42(transitive)
- Removedbabylon@7.0.0-beta.42(transitive)