Sha256: 8bb8c3bce96747df154f671eb6aeb7f7827ae6b57fd5e375c6d79d308df644a8
Contents?: true
Size: 680 Bytes
Versions: 31
Compression:
Stored size: 680 Bytes
Contents
/* */ "format cjs"; /** * 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
31 entries across 31 versions & 1 rubygems