Socket
Socket
Sign inDemoInstall

babel-plugin-transform-numeric-separator

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-numeric-separator - npm Package Compare versions

Comparing version 7.0.0-alpha.15 to 7.0.0-alpha.16

22

lib/index.js

@@ -8,6 +8,2 @@ "use strict";

function replacer(value) {
return value.replace(/_/g, "");
}
function replaceNumberArg(_ref2) {

@@ -19,23 +15,23 @@ var node = _ref2.node;

}
var arg = node.arguments[0];
if (!t.isStringLiteral(arg)) {
return;
}
arg.value = replacer(arg.value);
arg.value = arg.value.replace(/_/g, "");
}
var CallExpression = replaceNumberArg;
var NewExpression = replaceNumberArg;
return {
inherits: _babelPluginSyntaxNumericSeparator2.default,
visitor: {
CallExpression: CallExpression,
NewExpression: NewExpression,
CallExpression: replaceNumberArg,
NewExpression: replaceNumberArg,
NumericLiteral: function NumericLiteral(_ref3) {
var node = _ref3.node;
var extra = node.extra;
if (node.extra && /_/.test(node.extra.raw)) {
node.value = replacer(node.extra.raw);
if (extra && /_/.test(extra.raw)) {
extra.raw = extra.raw.replace(/_/g, "");
}

@@ -42,0 +38,0 @@ }

{
"name": "babel-plugin-transform-numeric-separator",
"version": "7.0.0-alpha.15",
"version": "7.0.0-alpha.16",
"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.15"
"babel-plugin-syntax-numeric-separator": "7.0.0-alpha.16"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "7.0.0-alpha.15"
"babel-helper-plugin-test-runner": "7.0.0-alpha.16"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc