MCPcopy Create free account
hub / github.com/getagentseal/codeburn / findJsonStringEndBuffer

Function findJsonStringEndBuffer

src/parser.ts:483–493  ·  view source on GitHub ↗
(source: Buffer, start: number, limit = source.length)

Source from the content-addressed store, hash-verified

481}
482
483function findJsonStringEndBuffer(source: Buffer, start: number, limit = source.length): number {
484 for (let i = start + 1; i < limit; i++) {
485 const ch = source[i]
486 if (ch === 0x5c) {
487 i++
488 continue
489 }
490 if (ch === 0x22) return i
491 }
492 return -1
493}
494
495function findJsonContainerEndBuffer(source: Buffer, start: number, open: number, close: number, limit = source.length): number {
496 let depth = 0

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected