es3.propertyLiterals

How to use the es3.propertyLiterals transformer.

Turn reserved word properties into literals.

Usage

require("babel").transform("code", { optional: ["minification.propertyLiterals"] });
$ babel --optional minification.propertyLiterals script.js

Example

In

var foo = {
  catch: function () {}
};

Out

var foo = {
  "catch": function () {}
};