How to use the jscript transformer.
This transformer transforms named function expressions into function declarations to get around some particularly nasty JScript bugs related to name function expressions.
require("babel").transform("code", { optional: ["jscript"] });
$ babel --optional jscript script.js
In
var foo = function bar() {
};
Out
"use strict";
var foo = (function () {
function bar() {}
return bar;
})();