Complete residential site build with Docker Compose & Gitea Actions deployment

This commit is contained in:
CalebLewallen
2026-05-13 17:31:20 -04:00
parent f9c4e13a50
commit 3c22823f72
19354 changed files with 2097331 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { removeQueryString } from "@astrojs/internal-helpers/path";
const DATA_PREFIX = "data:";
function inferSourceFormat(src) {
if (src.startsWith(DATA_PREFIX)) {
const mime = src.slice(DATA_PREFIX.length, src.indexOf(";"));
if (mime === "image/svg+xml") return "svg";
const sub = mime.split("/")[1];
return sub || void 0;
}
try {
const cleanSrc = removeQueryString(src).split("#")[0];
const lastDot = cleanSrc.lastIndexOf(".");
if (lastDot === -1) return void 0;
return cleanSrc.slice(lastDot + 1).toLowerCase();
} catch {
return void 0;
}
}
export {
inferSourceFormat
};