babel-core
Version:
Turn ES6 code into readable vanilla ES5 with source maps
13 lines (10 loc) • 381 B
JavaScript
;
var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
var t = _interopRequireWildcard(require("../types"));
module.exports = function (ast, comments, tokens) {
if (ast && ast.type === "Program") {
return t.file(ast, comments || [], tokens || []);
} else {
throw new Error("Not a valid ast?");
}
};