MCPcopy Index your code
hub / github.com/anomalyco/opencode / isPdfAttachment

Function isPdfAttachment

packages/opencode/src/util/media.ts:3–5  ·  view source on GitHub ↗
(mime: string)

Source from the content-addressed store, hash-verified

1const startsWith = (bytes: Uint8Array, prefix: number[]) => prefix.every((value, index) => bytes[index] === value)
2
3export function isPdfAttachment(mime: string) {
4 return mime === "application/pdf"
5}
6
7export function isMedia(mime: string) {
8 return mime.startsWith("image/") || isPdfAttachment(mime)

Callers 2

read.tsFile · 0.90
isMediaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected