Socket
Socket
Sign inDemoInstall

@babel/helper-hoist-variables

Package Overview
Dependencies
Maintainers
5
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-hoist-variables - npm Package Compare versions

Comparing version 7.0.0-beta.46 to 7.0.0-beta.47

33

lib/index.js

@@ -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"
}
}
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