* Returns true if the resulting source is empty (disregarding white space).
()
| 1043 | * Returns true if the resulting source is empty (disregarding white space). |
| 1044 | */ |
| 1045 | isEmpty(): boolean { |
| 1046 | let chunk: Chunk | null = this.firstChunk |
| 1047 | while (chunk) { |
| 1048 | if ( |
| 1049 | (chunk.intro.length && chunk.intro.trim()) |
| 1050 | || (chunk.content.length && chunk.content.trim()) |
| 1051 | || (chunk.outro.length && chunk.outro.trim()) |
| 1052 | ) { |
| 1053 | return false |
| 1054 | } |
| 1055 | chunk = chunk.next |
| 1056 | } |
| 1057 | return true |
| 1058 | } |
| 1059 | |
| 1060 | length(): number { |
| 1061 | let chunk: Chunk | null = this.firstChunk |