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