es5.properties.mutators

How to use the es5.properties.mutators transformer.

Turn object initializer mutators into Object.defineProperties.

Example

In

var foo = {
  get bar() {
    return "bar";
  }
};

Out

var foo = Object.defineProperties({}, {
  bar: {
    get: function () {
      return "bar";
    },
    enumerable: true,
    configurable: true
  }
});