(index, content)
| 58 | } |
| 59 | |
| 60 | appendLeft(index, content) { |
| 61 | index = index + this.offset; |
| 62 | |
| 63 | if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); |
| 64 | |
| 65 | if (DEBUG) this.stats.time('appendLeft'); |
| 66 | |
| 67 | this._split(index); |
| 68 | |
| 69 | const chunk = this.byEnd[index]; |
| 70 | |
| 71 | if (chunk) { |
| 72 | chunk.appendLeft(content); |
| 73 | } else { |
| 74 | this.intro += content; |
| 75 | } |
| 76 | |
| 77 | if (DEBUG) this.stats.timeEnd('appendLeft'); |
| 78 | return this; |
| 79 | } |
| 80 | |
| 81 | appendRight(index, content) { |
| 82 | index = index + this.offset; |
no test coverage detected