MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / startsWithBytes

Function startsWithBytes

packages/plugins/openapi/src/sdk/invoke.ts:376–377  ·  view source on GitHub ↗
(bytes: Uint8Array, prefix: readonly number[])

Source from the content-addressed store, hash-verified

374 normalizeContentType(mimeType) === "application/octet-stream";
375
376const startsWithBytes = (bytes: Uint8Array, prefix: readonly number[]): boolean =>
377 prefix.every((byte, index) => bytes[index] === byte);
378
379const isLikelyUtf8Text = (bytes: Uint8Array): boolean => {
380 if (bytes.length === 0) return false;

Callers 1

sniffMimeTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected