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