mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
refactor!: organize directories and files (#268)
* refactor!: organize directory structure * fix: avoid stack overflow err * chore: swtch back to std/encoding for base64 * style: format source files
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { ImageFormats, ImageSize } from "../types/types.ts";
|
||||
|
||||
export const formatImageURL = (
|
||||
url: string,
|
||||
size: ImageSize = 128,
|
||||
format?: ImageFormats,
|
||||
) => {
|
||||
return `${url}.${format ||
|
||||
(url.includes("/a_") ? "gif" : "jpg")}?size=${size}`;
|
||||
};
|
||||
Reference in New Issue
Block a user