MCPcopy Index your code
hub / github.com/simstudioai/sim / isBinaryBuffer

Function isBinaryBuffer

apps/sim/connectors/azure-devops/azure-devops.ts:109–115  ·  view source on GitHub ↗

* Heuristic binary detection: a NUL byte in the first 8 KB marks the file as * binary, matching `git diff` / `git grep` semantics.

(buf: Buffer)

Source from the content-addressed store, hash-verified

107 * binary, matching `git diff` / `git grep` semantics.
108 */
109function isBinaryBuffer(buf: Buffer): boolean {
110 const len = Math.min(buf.length, BINARY_SNIFF_BYTES)
111 for (let i = 0; i < len; i++) {
112 if (buf[i] === 0) return true
113 }
114 return false
115}
116
117/**
118 * Parses a comma-separated extension filter into a normalized set (leading dot,

Callers 1

getFileDocumentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected