initial public commit

This commit is contained in:
2026-02-22 21:26:15 -05:00
commit 9dbf7ae796
100 changed files with 18823 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import dayjs from "dayjs";
import parseTwtxt from "./parseTwtxt.js";
async function loadAndParseTwtxtFile(url = "") {
if (!url) throw new Error("URL is required");
try {
const response = await fetch(url);
const twtxtFile = await response.text();
const lastModified = dayjs(
response.headers.get("Last-Modified")
).toISOString();
return {
...parseTwtxt(twtxtFile),
lastModified
};
} catch (err) {
console.error(err);
throw err;
}
}
export {
loadAndParseTwtxtFile as default
};
//# sourceMappingURL=loadAndParseTwtxt.js.map