MCPcopy
hub / github.com/di-sukharev/opencommit / findBoundary

Function findBoundary

out/cli.cjs:34127–34140  ·  view source on GitHub ↗
(buffer, start)

Source from the content-addressed store, hash-verified

34125 };
34126 exports2.EventStream = EventStream2;
34127 function findBoundary(buffer, start) {
34128 const char1 = buffer[start];
34129 const char2 = buffer[start + 1];
34130 if (char1 == null || char2 == null || !NEWLINE_CHARS.has(char1) || !NEWLINE_CHARS.has(char2)) {
34131 return null;
34132 }
34133 for (const s2 of MESSAGE_BOUNDARIES) {
34134 const seq = peekSequence(start, buffer, s2);
34135 if (seq != null) {
34136 return seq;
34137 }
34138 }
34139 return null;
34140 }
34141 function peekSequence(position, buffer, sequence) {
34142 if (sequence.length > buffer.length - position) {
34143 return null;

Callers 2

startFunction · 0.85

Calls 2

peekSequenceFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…