()
| 252 | } |
| 253 | |
| 254 | getIndentString(): string { |
| 255 | const indentStringCounts = {} |
| 256 | |
| 257 | this.sources.forEach((source) => { |
| 258 | const indentStr = source.content._getRawIndentString() |
| 259 | |
| 260 | if (indentStr === null) |
| 261 | return |
| 262 | |
| 263 | if (!indentStringCounts[indentStr]) |
| 264 | indentStringCounts[indentStr] = 0 |
| 265 | indentStringCounts[indentStr] += 1 |
| 266 | }) |
| 267 | |
| 268 | return ( |
| 269 | Object.keys(indentStringCounts).sort((a, b) => { |
| 270 | return indentStringCounts[b] - indentStringCounts[a] |
| 271 | })[0] || '\t' |
| 272 | ) |
| 273 | } |
| 274 | |
| 275 | indent(indentStr?: string): this { |
| 276 | if (!arguments.length) { |
no test coverage detected