feat: 🎸 add dicts (#1022)

This commit is contained in:
divisey
2024-08-29 14:02:52 +08:00
committed by GitHub
parent 7b30628c36
commit a1e7b7a062
44 changed files with 2213 additions and 363 deletions

View File

@@ -148,3 +148,7 @@ export const humanFileSize = (bytes: number, si: boolean = false) => {
);
return bytes.toFixed(1) + " " + units[u];
};
export function getExtension(filename: string, defaultExt: string) {
return /(?:\.([^.]+))?$/.exec(filename)[1] || defaultExt;
}