@scalar/api-client
Version:
the open source API testing client
23 lines (22 loc) • 510 B
JavaScript
import { AVAILABLE_CLIENTS as f } from "@scalar/snippetz";
const c = "shell/curl", d = (o) => f.includes(o), u = (o, s) => {
const r = o[0]?.options[0];
if (s)
for (const i of o) {
const t = i.options.find((n) => n.id === s);
if (t)
return t;
}
if (!r?.id.startsWith("custom"))
for (const i of o) {
const t = i.options.find((n) => n.id === c);
if (t)
return t;
}
return r;
};
export {
c as DEFAULT_CLIENT,
u as findClient,
d as isClient
};