MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / hasPrefix

Function hasPrefix

src/utils/sessionStoragePortable.ts:537–547  ·  view source on GitHub ↗
(
  src: Buffer,
  prefix: Buffer,
  at: number,
  end: number,
)

Source from the content-addressed store, hash-verified

535}
536
537function hasPrefix(
538 src: Buffer,
539 prefix: Buffer,
540 at: number,
541 end: number,
542): boolean {
543 return (
544 end - at >= prefix.length &&
545 src.compare(prefix, 0, prefix.length, at, at + prefix.length) === 0
546 )
547}
548
549const ATTR_SNAP_PREFIX = Buffer.from('{"type":"attribution-snapshot"')
550const SYSTEM_PREFIX = Buffer.from('{"type":"system"')

Callers 3

processStraddleFunction · 0.85
scanChunkLinesFunction · 0.85
finalizeOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected