Merge origin/master into ji

This commit is contained in:
吉鑫升 committed 2026-06-05 10:04:11 +08:00
commit e96cc97462
54 files changed
+4900 -334

No files matched your search

+17
View File
@@ -151,6 +151,23 @@ export function getFileExtension(filepath: string) {
return filepath.split(".").pop()!.toLocaleLowerCase();
}
const IMAGE_EXTENSIONS = new Set([
"png",
"jpg",
"jpeg",
"gif",
"webp",
"svg",
"bmp",
"ico",
"tiff",
"heic",
]);
export function isImageFile(filepath: string): boolean {
return IMAGE_EXTENSIONS.has(getFileExtension(filepath));
}
export function checkCodeFile(
filepath: string,
):