()
| 231 | } |
| 232 | |
| 233 | getIndentString(): string { |
| 234 | const indentStringCounts = {} |
| 235 | |
| 236 | this.sources.forEach((source) => { |
| 237 | const indentStr = source.content._getRawIndentString() |
| 238 | |
| 239 | if (indentStr === null) |
| 240 | return |
| 241 | |
| 242 | if (!indentStringCounts[indentStr]) |
| 243 | indentStringCounts[indentStr] = 0 |
| 244 | indentStringCounts[indentStr] += 1 |
| 245 | }) |
| 246 | |
| 247 | return ( |
| 248 | Object.keys(indentStringCounts).sort((a, b) => { |
| 249 | return indentStringCounts[b] - indentStringCounts[a] |
| 250 | })[0] || '\t' |
| 251 | ) |
| 252 | } |
| 253 | |
| 254 | indent(indentStr?: string): this { |
| 255 | if (!arguments.length) { |
no test coverage detected