[][src]Function swc_ecma_transforms::compat::es2015::shorthand

pub fn shorthand() -> impl 'static + Fold

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;
   }
 };