(inBuf)
| 66 | } |
| 67 | |
| 68 | addStringBuf(inBuf) { |
| 69 | if (inBuf.length) { |
| 70 | this._buffer = undefined; |
| 71 | |
| 72 | if (this.length + inBuf.length > this.capacity) { |
| 73 | this._grow(this.length + inBuf.length); |
| 74 | } |
| 75 | // eslint-disable-next-line no-underscore-dangle |
| 76 | inBuf._buf.copy(this._buf, this._inPos, 0, inBuf.length); |
| 77 | this._inPos += inBuf.length; |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | module.exports = StringBuf; |