From dce1a3548cc6d07017d064944bf1f08d0d4dd11d Mon Sep 17 00:00:00 2001 From: James Kyle Date: Sat, 11 Jul 2015 12:06:45 -0700 Subject: [PATCH] Add descriptions to transformation/transformers/es3/property-literals --- .../transformers/es3/property-literals.js | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) 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: {