-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
index.js
53 lines (53 loc) · 1.42 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
var source = Math.random() < 2 ? "matilda" : "fred";
var details = {
_id: "1"
};
function request(path) {
return _request.apply(this, arguments);
}
function _request() {
_request = _async_to_generator(function(path) {
return _ts_generator(this, function(_state) {
return [
2,
"success:".concat(path)
];
});
});
return _request.apply(this, arguments);
}
_async_to_generator(function() {
var obj, _tmp;
return _ts_generator(this, function(_state) {
switch(_state.label){
case 0:
if (!(source === "matilda")) return [
3,
1
];
_tmp = details;
return [
3,
3
];
case 1:
return [
4,
request("/".concat(details._id, "?source=").concat(source))
];
case 2:
_tmp = _state.sent();
_state.label = 3;
case 3:
obj = _tmp;
console.log({
obj: obj
});
return [
2
];
}
});
})();