babel-plugin-transform-es2015-shorthand-properties
    Overview
    Documentation
    Code
    Playground
    Issues
    Insights
    Contributors
    Dependencies
    Versions
    Alternatives

babel-plugin-transform-es2015-shorthand-properties

Compile ES2015 shorthand properties to ES5

6.24.1  •  Published 2 years ago  •  by hzoo  •  MIT License

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

Via .babelrc (Recommended)

.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"]
});

Popularity

Weekly Downloads
2.3M

Maintenance

Development

Last ver 2 years ago
Created 4 years ago
Last commit 1 second ago
1 second between commits

Technology

Node version: 6.9.0
0 unpacked

Legal and Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

0 contributors

Tags

babel-plugin