MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / chunk

Method chunk

src/utils/StreamReader.js:38–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 async chunk() {
39 if (this.eof()) return
40 if (!this.started) await this._init()
41 if (this.cursor === this.buffer.length) {
42 await this._loadnext()
43 if (this._ended) return
44 }
45 this._moveCursor(this.buffer.length)
46 return this.buffer.slice(this.undoCursor, this.cursor)
47 }
48
49 async read(n) {
50 if (this.eof()) return

Callers 1

listpackFunction · 0.95

Calls 5

eofMethod · 0.95
_initMethod · 0.95
_loadnextMethod · 0.95
_moveCursorMethod · 0.95
sliceMethod · 0.80

Tested by

no test coverage detected