Socket
Socket
Sign inDemoInstall

babel-plugin-transform-es2015-shorthand-properties

Package Overview
Dependencies
7
Maintainers
6
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-shorthand-properties

Compile ES2015 shorthand properties to ES5


Version published
Maintainers
6
Weekly downloads
1,384,391
decreased by-7.84%

Weekly downloads

Readme

Source

babel-plugin-transform-es2015-shorthand-properties

Compile ES2015 shorthand properties to ES5

Example

In

var o = { a, b, c };

Out

var o = { a: a, b: b, c: c };

In

var cat = {
  getName() {
    return name;
  }
};

Out

var cat = {
  getName: function () {
    return name;
  }
};

Installation

npm install --save-dev babel-plugin-transform-es2015-shorthand-properties

Usage

.babelrc

{
  "plugins": ["transform-es2015-shorthand-properties"]
}

Via CLI

babel --plugins transform-es2015-shorthand-properties script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-es2015-shorthand-properties"]
});

Keywords

FAQs

Last updated on 07 Apr 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc