MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / mediaTypeFromExtension

Function mediaTypeFromExtension

projects/runtime-node/src/fileMetadata.ts:94–96  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

92}
93
94function mediaTypeFromExtension(filePath: string): string | null {
95 return IMAGE_EXTENSION_MEDIA_TYPES.get(path.extname(filePath).toLowerCase()) ?? null
96}
97
98function isKnownBinaryExtension(filePath: string): boolean {
99 return KNOWN_BINARY_EXTENSIONS.has(path.extname(filePath).toLowerCase())

Callers 1

classifyFileMetadataFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected