babel/packages/babel-plugin-es5-property-mutators

babel-plugin-es5-property-mutators

Compile ES5 property mutator shorthand syntax to Object.defineProperty

Installation

$ npm install babel-plugin-es5-property-mutators

Usage

.babelrc

{
  "plugins": ["es5-property-mutators"]
}

Via CLI

$ babel --plugins es5-property-mutators script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["es5-property-mutators"]
});