(string: string)
| 115 | } |
| 116 | |
| 117 | function minIndent(string: string) { |
| 118 | const match = string.match(/^[ \t]*(?=\S)/gm) |
| 119 | |
| 120 | if (!match) { |
| 121 | return 0 |
| 122 | } |
| 123 | |
| 124 | return match.reduce((r, a) => Math.min(r, a.length), Infinity) |
| 125 | } |
| 126 | |
| 127 | function stripIndent(string: string) { |
| 128 | const indent = minIndent(string) |