Files
discord-clone/node_modules/ofetch/cjs/index.cjs
2023-01-03 09:29:04 -06:00

9 lines
505 B
JavaScript

const getExport = name => import("../dist/index.mjs").then(r => r[name]);
const createCaller = name => (input, init) => getExport(name).then(function_ => function_(input, init));
exports.fetch = createCaller("fetch");
exports.ofetch = createCaller("ofetch");
exports.$fetch = createCaller("$fetch");
exports.$fetch.raw = (input, init) => getExport("$fetch").then($fetch => $fetch.raw(input, init));
exports.$fetch.native = (input, init) => getExport("$fetch").then($fetch => $fetch.native(input, init));