* Returns true if the resulting source is empty (disregarding white space).
()
| 1035 | * Returns true if the resulting source is empty (disregarding white space). |
| 1036 | */ |
| 1037 | isEmpty(): boolean { |
| 1038 | let chunk: Chunk | null = this.firstChunk |
| 1039 | while (chunk) { |
| 1040 | if ( |
| 1041 | (chunk.intro.length && chunk.intro.trim()) |
| 1042 | || (chunk.content.length && chunk.content.trim()) |
| 1043 | || (chunk.outro.length && chunk.outro.trim()) |
| 1044 | ) { |
| 1045 | return false |
| 1046 | } |
| 1047 | chunk = chunk.next |
| 1048 | } |
| 1049 | return true |
| 1050 | } |
| 1051 | |
| 1052 | length(): number { |
| 1053 | let chunk: Chunk | null = this.firstChunk |