Sha256: 72701613987569ec98110c00e2139eee06f0fd04a5ae943b6eb868e6337f3261
Contents?: true
Size: 659 Bytes
Versions: 8
Compression:
Stored size: 659 Bytes
Contents
/** * Turn arrow functions into normal functions. * * @example * * **In** * * ```javascript * arr.map(x => x * x); * ``` * * **Out** * * ```javascript * arr.map(function (x) { * return x * x; * }); */ "use strict"; exports.__esModule = true; var visitor = { /** * Look for arrow functions and mark them as "shadow functions". * @see /transformation/transformers/internal/shadow-functions.js */ ArrowFunctionExpression: function ArrowFunctionExpression(node) { this.ensureBlock(); node.expression = false; node.type = "FunctionExpression"; node.shadow = node.shadow || true; } }; exports.visitor = visitor;
Version data entries
8 entries across 8 versions & 3 rubygems