()
| 170 | } |
| 171 | |
| 172 | getIndentString() { |
| 173 | const indentStringCounts = {}; |
| 174 | |
| 175 | this.sources.forEach((source) => { |
| 176 | const indentStr = source.content._getRawIndentString(); |
| 177 | |
| 178 | if (indentStr === null) return; |
| 179 | |
| 180 | if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; |
| 181 | indentStringCounts[indentStr] += 1; |
| 182 | }); |
| 183 | |
| 184 | return ( |
| 185 | Object.keys(indentStringCounts).sort((a, b) => { |
| 186 | return indentStringCounts[a] - indentStringCounts[b]; |
| 187 | })[0] || '\t' |
| 188 | ); |
| 189 | } |
| 190 | |
| 191 | indent(indentStr) { |
| 192 | if (!arguments.length) { |
no test coverage detected