From 90a5b964806092a68237ab237fac533fbd56bfef Mon Sep 17 00:00:00 2001 From: James Kyle Date: Sat, 11 Jul 2015 12:07:40 -0700 Subject: [PATCH] Add descriptions to transformation/transformers/es6/arrow-functions --- .../transformers/es6/arrow-functions.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/babel/transformation/transformers/es6/arrow-functions.js b/src/babel/transformation/transformers/es6/arrow-functions.js index 2f36b56141..0ade7a3067 100644 --- a/src/babel/transformation/transformers/es6/arrow-functions.js +++ b/src/babel/transformation/transformers/es6/arrow-functions.js @@ -1,11 +1,26 @@ /** - * [Please add a description.] + * Turn arrow functions into normal functions. + * + * @example + * + * **In** + * + * ```javascript + * arr.map(x => x * x); + * ``` + * + * **Out** + * + * ```javascript + * arr.map(function (x) { + * return x * x; + * }); */ export var visitor = { /** - * [Please add a description.] + * Look for arrow functions and turn them into normal functions. */ ArrowFunctionExpression(node) {