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

Function hasPrefix

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

Source from the content-addressed store, hash-verified

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