| 957 | return new SourceMap(this.generateDecodedMap(options)); |
| 958 | } |
| 959 | getIndentString() { |
| 960 | const indentStringCounts = {}; |
| 961 | this.sources.forEach((source) => { |
| 962 | const indentStr = source.content.indentStr; |
| 963 | if (indentStr === null) return; |
| 964 | if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; |
| 965 | indentStringCounts[indentStr] += 1; |
| 966 | }); |
| 967 | return ( |
| 968 | Object.keys(indentStringCounts).sort((a, b) => { |
| 969 | return indentStringCounts[a] - indentStringCounts[b]; |
| 970 | })[0] || ' ' |
| 971 | ); |
| 972 | } |
| 973 | indent(indentStr) { |
| 974 | if (!arguments.length) { |
| 975 | indentStr = this.getIndentString(); |