New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-merge-sibling-variables

Package Overview
Dependencies
Maintainers
6
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-merge-sibling-variables

Merge sibling variables into one.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
388K
decreased by-8.07%
Maintainers
6
Weekly downloads
 
Created
Source

babel-plugin-transform-merge-sibling-variables

Merge sibling variables into one.

Example

In

// merge into a single VariableDeclaration
var foo = "bar";
var bar = "foo";
foobar();

// merge into the next for loop
var i = 0;
for (var x = 0; x < 10; x++) {}

Out

var foo = "bar",
    bar = "foo";
foobar();

for (var i = 0, x = 0; x < 10; x++) {}

Installation

$ npm install babel-plugin-transform-merge-sibling-variables

Usage

.babelrc

{
  "plugins": ["transform-merge-sibling-variables"]
}

Via CLI

$ babel --plugins transform-merge-sibling-variables script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-merge-sibling-variables"]
});

Keywords

FAQs

Package last updated on 26 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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