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

Method _trim

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

Source from the content-addressed store, hash-verified

85 }
86
87 _trim() {
88 // Throw away parts of the buffer we don't need anymore
89 // assert(this.cursor <= this.buffer.length)
90 this.buffer = this.buffer.slice(this.undoCursor)
91 this.cursor -= this.undoCursor
92 this._discardedBytes += this.undoCursor
93 this.undoCursor = 0
94 }
95
96 _moveCursor(n) {
97 this.undoCursor = this.cursor

Callers 2

readMethod · 0.95
skipMethod · 0.95

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected