From 8efeae80afd2d96ae99c3d10aec65e9703d96560 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 26 Feb 2015 20:39:30 +1100 Subject: [PATCH] remove `export function Function` --- src/babel/detection/visitors.js | 2 +- .../transformation/transformers/other/async-to-generator.js | 2 +- .../transformation/transformers/other/bluebird-coroutines.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/babel/detection/visitors.js b/src/babel/detection/visitors.js index 227dc6972b..098cbb267b 100644 --- a/src/babel/detection/visitors.js +++ b/src/babel/detection/visitors.js @@ -43,7 +43,7 @@ export function AssignmentPattern(node, parent, detected) { } } -export function Function(node, parent, detected) { +exports.Function = function (node, parent, detected) { if (node.generator) { detected("es6.generators"); } diff --git a/src/babel/transformation/transformers/other/async-to-generator.js b/src/babel/transformation/transformers/other/async-to-generator.js index 8541660441..9c56559c39 100644 --- a/src/babel/transformation/transformers/other/async-to-generator.js +++ b/src/babel/transformation/transformers/other/async-to-generator.js @@ -4,7 +4,7 @@ export { manipulateOptions } from "./bluebird-coroutines"; export var optional = true; -export function Function(node, parent, scope, file) { +exports.Function = function (node, parent, scope, file) { if (!node.async || node.generator) return; return remapAsyncToGenerator(node, file.addHelper("async-to-generator"), scope); diff --git a/src/babel/transformation/transformers/other/bluebird-coroutines.js b/src/babel/transformation/transformers/other/bluebird-coroutines.js index 0e7234b60c..b03fc88477 100644 --- a/src/babel/transformation/transformers/other/bluebird-coroutines.js +++ b/src/babel/transformation/transformers/other/bluebird-coroutines.js @@ -8,7 +8,7 @@ export function manipulateOptions(opts) { export var optional = true; -export function Function(node, parent, scope, file) { +exports.Function = function (node, parent, scope, file) { if (!node.async || node.generator) return; return remapAsyncToGenerator( @@ -16,4 +16,4 @@ export function Function(node, parent, scope, file) { t.memberExpression(file.addImport("bluebird", null, true), t.identifier("coroutine")), scope ); -} +};