diff --git a/src/babel/transformation/transformers/es3/property-literals.js b/src/babel/transformation/transformers/es3/property-literals.js index 1152ce5b62..47d1c3f0a2 100644 --- a/src/babel/transformation/transformers/es3/property-literals.js +++ b/src/babel/transformation/transformers/es3/property-literals.js @@ -5,13 +5,30 @@ export var metadata = { }; /** - * [Please add a description.] + * Turn reserved word properties into literals. + * + * **In** + * + * ```javascript + * var foo = { + * catch: function () {} + * }; + * ``` + * + * **Out** + * + * ```javascript + * var foo = { + * "catch": function () {} + * }; + * ``` */ export var visitor = { /** - * [Please add a description.] + * Look for non-computed keys with names that are not valid identifiers. + * Turn them into literals. */ Property: {