MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / isImage

Function isImage

packages/utilities/src/files.ts:17–23  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

15const SUPPORTED_EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif'];
16
17export function isImage(name: string): boolean {
18 const extension = getExtension(name);
19 if (!extension) {
20 return false;
21 }
22 return SUPPORTED_EXTENSIONS.includes(extension.toLowerCase());
23}
24
25export async function fetchImageDimensions(
26 file: File

Callers 4

files.test.tsFile · 0.90
AttachmentsFunction · 0.90
LinkFunction · 0.90
getFormDataFunction · 0.85

Calls 1

getExtensionFunction · 0.85

Tested by

no test coverage detected