MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / hasPrefix

Function hasPrefix

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

Source from the content-addressed store, hash-verified

539}
540
541function hasPrefix(
542 src: Buffer,
543 prefix: Buffer,
544 at: number,
545 end: number,
546): boolean {
547 return (
548 end - at >= prefix.length &&
549 src.compare(prefix, 0, prefix.length, at, at + prefix.length) === 0
550 )
551}
552
553const ATTR_SNAP_PREFIX = Buffer.from('{"type":"attribution-snapshot"')
554const 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