()
| 337 | } |
| 338 | |
| 339 | length(): number { |
| 340 | return this.sources.reduce((length, source, i) => { |
| 341 | // mirrors toString(): every source but the first is preceded by a separator |
| 342 | const separator = source.separator !== undefined ? source.separator : this.separator |
| 343 | |
| 344 | return length + (i > 0 ? separator.length : 0) + source.content.toString().length |
| 345 | }, this.intro.length) |
| 346 | } |
| 347 | |
| 348 | trimLines(): this { |
| 349 | return this.trim('[\\r\\n]') |
no test coverage detected