(chunk: string)
| 207 | constructor(private readonly capacity: number) {} |
| 208 | |
| 209 | push(chunk: string): void { |
| 210 | this.buffer += chunk; |
| 211 | if (this.buffer.length > this.capacity) { |
| 212 | this.buffer = this.buffer.slice(this.buffer.length - this.capacity); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | snapshot(): string { |
| 217 | return this.buffer; |
no outgoing calls