@babel/helper-hoist-variables
Advanced tools
Comparing version 7.0.0-beta.46 to 7.0.0-beta.47
@@ -9,3 +9,3 @@ "use strict"; | ||
function t() { | ||
var data = _interopRequireWildcard(require("@babel/types")); | ||
const data = _interopRequireWildcard(require("@babel/types")); | ||
@@ -21,14 +21,16 @@ t = function t() { | ||
var visitor = { | ||
Scope: function Scope(path, state) { | ||
const visitor = { | ||
Scope(path, state) { | ||
if (state.kind === "let") path.skip(); | ||
}, | ||
Function: function Function(path) { | ||
Function(path) { | ||
path.skip(); | ||
}, | ||
VariableDeclaration: function VariableDeclaration(path, state) { | ||
VariableDeclaration(path, state) { | ||
if (state.kind && path.node.kind !== state.kind) return; | ||
var nodes = []; | ||
var declarations = path.get("declarations"); | ||
var firstId; | ||
const nodes = []; | ||
const declarations = path.get("declarations"); | ||
let firstId; | ||
@@ -47,3 +49,3 @@ for (var _iterator = declarations, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { | ||
var declar = _ref; | ||
const declar = _ref; | ||
firstId = declar.node.id; | ||
@@ -55,3 +57,3 @@ | ||
for (var name in declar.getBindingIdentifiers()) { | ||
for (const name in declar.getBindingIdentifiers()) { | ||
state.emit(t().identifier(name), name); | ||
@@ -69,13 +71,10 @@ } | ||
} | ||
}; | ||
function _default(path, emit, kind) { | ||
if (kind === void 0) { | ||
kind = "var"; | ||
} | ||
function _default(path, emit, kind = "var") { | ||
path.traverse(visitor, { | ||
kind: kind, | ||
emit: emit | ||
kind, | ||
emit | ||
}); | ||
} |
{ | ||
"name": "@babel/helper-hoist-variables", | ||
"version": "7.0.0-beta.46", | ||
"version": "7.0.0-beta.47", | ||
"description": "Helper function to hoist variables", | ||
@@ -9,4 +9,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-hoist-variables", | ||
"dependencies": { | ||
"@babel/types": "7.0.0-beta.46" | ||
"@babel/types": "7.0.0-beta.47" | ||
} | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
2606
59
+ Added@babel/types@7.0.0-beta.47(transitive)
- Removed@babel/types@7.0.0-beta.46(transitive)
Updated@babel/types@7.0.0-beta.47