source: trip-planner-front/node_modules/@babel/core/lib/config/index.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.4 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.createConfigItem = createConfigItem;
7Object.defineProperty(exports, "default", {
8 enumerable: true,
9 get: function () {
10 return _full.default;
11 }
12});
13exports.createConfigItemAsync = exports.createConfigItemSync = exports.loadOptionsAsync = exports.loadOptionsSync = exports.loadOptions = exports.loadPartialConfigAsync = exports.loadPartialConfigSync = exports.loadPartialConfig = void 0;
14
15function _gensync() {
16 const data = require("gensync");
17
18 _gensync = function () {
19 return data;
20 };
21
22 return data;
23}
24
25var _full = require("./full");
26
27var _partial = require("./partial");
28
29var _item = require("./item");
30
31const loadOptionsRunner = _gensync()(function* (opts) {
32 var _config$options;
33
34 const config = yield* (0, _full.default)(opts);
35 return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
36});
37
38const createConfigItemRunner = _gensync()(_item.createConfigItem);
39
40const maybeErrback = runner => (opts, callback) => {
41 if (callback === undefined && typeof opts === "function") {
42 callback = opts;
43 opts = undefined;
44 }
45
46 return callback ? runner.errback(opts, callback) : runner.sync(opts);
47};
48
49const loadPartialConfig = maybeErrback(_partial.loadPartialConfig);
50exports.loadPartialConfig = loadPartialConfig;
51const loadPartialConfigSync = _partial.loadPartialConfig.sync;
52exports.loadPartialConfigSync = loadPartialConfigSync;
53const loadPartialConfigAsync = _partial.loadPartialConfig.async;
54exports.loadPartialConfigAsync = loadPartialConfigAsync;
55const loadOptions = maybeErrback(loadOptionsRunner);
56exports.loadOptions = loadOptions;
57const loadOptionsSync = loadOptionsRunner.sync;
58exports.loadOptionsSync = loadOptionsSync;
59const loadOptionsAsync = loadOptionsRunner.async;
60exports.loadOptionsAsync = loadOptionsAsync;
61const createConfigItemSync = createConfigItemRunner.sync;
62exports.createConfigItemSync = createConfigItemSync;
63const createConfigItemAsync = createConfigItemRunner.async;
64exports.createConfigItemAsync = createConfigItemAsync;
65
66function createConfigItem(target, options, callback) {
67 if (callback !== undefined) {
68 return createConfigItemRunner.errback(target, options, callback);
69 } else if (typeof options === "function") {
70 return createConfigItemRunner.errback(target, undefined, callback);
71 } else {
72 return createConfigItemRunner.sync(target, options);
73 }
74}
Note: See TracBrowser for help on using the repository browser.