MCPcopy
hub / github.com/webpack/webpack / isInCurrentBuffer

Method isInCurrentBuffer

lib/serialization/BinaryMiddleware.js:207–213  ·  view source on GitHub ↗

* Checks whether n bytes are available in the current buffer. * @param {number} n n * @returns {boolean} true when in current buffer, otherwise false

(n)

Source from the content-addressed store, hash-verified

205 * @returns {boolean} true when in current buffer, otherwise false
206 */
207 isInCurrentBuffer(n) {
208 return (
209 this.currentIsBuffer &&
210 n + this.currentPosition <=
211 /** @type {Buffer} */ (this.currentBuffer).length
212 );
213 }
214
215 ensureBuffer() {
216 if (!this.currentIsBuffer) {

Callers 2

readU32Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected