From bc3502d6955772dd5d61032566b9ade1194bfe6c Mon Sep 17 00:00:00 2001 From: Richard Eames Date: Tue, 18 Nov 2014 15:29:59 -0700 Subject: [PATCH] Allow module transformers to be directly passed into opts. --- lib/6to5/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/file.js b/lib/6to5/file.js index d8ecb685bf..d26194a1e3 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -59,7 +59,7 @@ File.normaliseOptions = function (opts) { }; File.prototype.getModuleFormatter = function (type) { - var ModuleFormatter = transform.moduleFormatters[type]; + var ModuleFormatter = _.isFunction(type) ? type : transform.moduleFormatters[type]; if (!ModuleFormatter) { var loc = util.resolve(type);