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

Function startsWith

packages/opencode/src/util/media.ts:1–1  ·  view source on GitHub ↗
(bytes: Uint8Array, prefix: number[])

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"

Callers 1

sniffAttachmentMimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected