Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var value;
if (scheme[0] >= -881134847) {
value = "Bearer " + (String(scheme[1]) + "");
} else {
var match = scheme[1];
var encoded = Curry._1(Refetch__Utils.btoa, "" + (String(match[0]) + (":" + (String(match[1]) + ""))));
value = "Basic " + (String(encoded) + "");
}
return /* tuple */[
"Authorization",
value
];
}
} else if (variant !== -378039458) {
if (variant !== 4099528) {
return Pervasives.failwith("TODO");
} else {
var match$1 = param[1];
return /* tuple */[
match$1[0],
match$1[1]
];
}
} else {
var match$2 = param[1];
var typ = match$2[0];
var typ$1 = typeof typ === "number" ? (
typ >= -735835133 ? "attachment" : "inline"
) : typ[1];
var value$1 = Rebase.List[/* reduce */3]((function (acc, p) {
return "" + (String(acc) + ("; " + (String(p) + "")));
}), typ$1, Rebase.List[/* map */0]((function (param) {
function _pairifyHeader(h) {
var param = h;
if (typeof param === "number") {
return Pervasives.failwith("TODO");
} else {
var variant = param[0];
if (variant >= 246273139) {
if (variant !== 826042841) {
if (variant !== 1022564063) {
if (variant >= 246273140) {
return Pervasives.failwith("TODO");
} else {
return /* tuple */[
"Content-Type",
param[1]
];
}
} else {
return /* tuple */[
"Content-Length",
String(param[1])
];
}
} else {
var scheme = param[1];
var value;
if (scheme[0] >= -881134847) {
}), Resync.Future[/* map */8]((function (param) {
if (param.tag) {
return Pervasives.failwith(param[0][/* reason */1]);
} else {
return Refetch__Response.body(param[1]);
}
}), Refetch.get("http://httpbin.org/image/png")));
case 17 :
case 18 :
case 19 :
case 20 :
case 21 :
case 22 :
case 23 :
case 24 :
case 25 :
return Pervasives.failwith("TODO: exception or option?");
case 26 :
return /* IMUsed */1047445569;
}
} else {
return Pervasives.failwith("TODO: exception or option?");
}
}
function fromRecord(param) {
var rank = param[/* rank */1];
switch (param[/* type_ */0]) {
case "Intelligence" :
return /* Intelligence */Block.__(1, [rank]);
case "Special" :
return /* Special */Block.__(2, [rank]);
case "Strength" :
return /* Strength */Block.__(0, [rank]);
default:
return Pervasives.failwith("Invalid stat type.");
}
}
return /* SuiteCycle */Block.__(2, [
data.id,
makeResult(/* () */0)
]);
case "testCycle" :
return /* TestCycle */Block.__(0, [
data.id,
makeResult(/* () */0)
]);
case "testError" :
return /* TestError */Block.__(1, [
data.id,
data.error
]);
default:
return Pervasives.failwith("unknown worker message");
}
}
function handleEventTarget(param) {
return Pervasives.failwith("Event components are not implemented");
}
function mountEventComponent(param) {
return Pervasives.failwith("Event components are not implemented");
}
function getChildHostContextForEventTarget(param) {
return Pervasives.failwith("Event components are not implemented");
}
function getChildHostContextForEventComponent(param) {
return Pervasives.failwith("Event components are not implemented");
}