* Returns true if the resulting source is empty (disregarding white space).
()
| 1004 | * Returns true if the resulting source is empty (disregarding white space). |
| 1005 | */ |
| 1006 | isEmpty(): boolean { |
| 1007 | let chunk: Chunk | null = this.firstChunk |
| 1008 | while (chunk) { |
| 1009 | if ( |
| 1010 | (chunk.intro.length && chunk.intro.trim()) |
| 1011 | || (chunk.content.length && chunk.content.trim()) |
| 1012 | || (chunk.outro.length && chunk.outro.trim()) |
| 1013 | ) { |
| 1014 | return false |
| 1015 | } |
| 1016 | chunk = chunk.next |
| 1017 | } |
| 1018 | return true |
| 1019 | } |
| 1020 | |
| 1021 | length(): number { |
| 1022 | let chunk: Chunk | null = this.firstChunk |