source: imaps-frontend/node_modules/@babel/core/lib/transform.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.5 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.transform = void 0;
7exports.transformAsync = transformAsync;
8exports.transformSync = transformSync;
9function _gensync() {
10 const data = require("gensync");
11 _gensync = function () {
12 return data;
13 };
14 return data;
15}
16var _index = require("./config/index.js");
17var _index2 = require("./transformation/index.js");
18var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js");
19const transformRunner = _gensync()(function* transform(code, opts) {
20 const config = yield* (0, _index.default)(opts);
21 if (config === null) return null;
22 return yield* (0, _index2.run)(config, code);
23});
24const transform = exports.transform = function transform(code, optsOrCallback, maybeCallback) {
25 let opts;
26 let callback;
27 if (typeof optsOrCallback === "function") {
28 callback = optsOrCallback;
29 opts = undefined;
30 } else {
31 opts = optsOrCallback;
32 callback = maybeCallback;
33 }
34 if (callback === undefined) {
35 {
36 return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(code, opts);
37 }
38 }
39 (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.errback)(code, opts, callback);
40};
41function transformSync(...args) {
42 return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(...args);
43}
44function transformAsync(...args) {
45 return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.async)(...args);
46}
470 && 0;
48
49//# sourceMappingURL=transform.js.map
Note: See TracBrowser for help on using the repository browser.