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