MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / feed

Method feed

src/sanitize.js:145–153  ·  view source on GitHub ↗
(delta)

Source from the content-addressed store, hash-verified

143 }
144
145 feed(delta) {
146 if (!delta) return '';
147 this.buffer += delta;
148 const cut = this._safeCutPoint();
149 if (cut === 0) return '';
150 const safeRegion = this.buffer.slice(0, cut);
151 this.buffer = this.buffer.slice(cut);
152 return sanitizeText(safeRegion);
153 }
154
155 // Largest index into this.buffer such that buffer[0:cut] contains no
156 // match that could extend past `cut`. Two conditions back off the cut:

Calls 2

_safeCutPointMethod · 0.95
sanitizeTextFunction · 0.85

Tested by

no test coverage detected