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

Method read

src/utils/StreamReader.js:49–58  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

47 }
48
49 async read(n) {
50 if (this.eof()) return
51 if (!this.started) await this._init()
52 if (this.cursor + n > this.buffer.length) {
53 this._trim()
54 await this._accumulate(n)
55 }
56 this._moveCursor(n)
57 return this.buffer.slice(this.undoCursor, this.cursor)
58 }
59
60 async skip(n) {
61 if (this.eof()) return

Callers 5

listpackFunction · 0.95
streamReaderMethod · 0.95
parseHeaderFunction · 0.45
nextFunction · 0.45
checkAndWriteBlobFunction · 0.45

Calls 6

eofMethod · 0.95
_initMethod · 0.95
_trimMethod · 0.95
_accumulateMethod · 0.95
_moveCursorMethod · 0.95
sliceMethod · 0.80

Tested by

no test coverage detected