* Returns true if the resulting source is empty (disregarding white space).
()
| 987 | * Returns true if the resulting source is empty (disregarding white space). |
| 988 | */ |
| 989 | isEmpty(): boolean { |
| 990 | let chunk: Chunk | null = this.firstChunk |
| 991 | while (chunk) { |
| 992 | if ( |
| 993 | (chunk.intro.length && chunk.intro.trim()) |
| 994 | || (chunk.content.length && chunk.content.trim()) |
| 995 | || (chunk.outro.length && chunk.outro.trim()) |
| 996 | ) { |
| 997 | return false |
| 998 | } |
| 999 | chunk = chunk.next |
| 1000 | } |
| 1001 | return true |
| 1002 | } |
| 1003 | |
| 1004 | length(): number { |
| 1005 | let chunk: Chunk | null = this.firstChunk |