(str: string, indentLevel: number = 2)
| 1 | // From https://github.com/sindresorhus/indent-string |
| 2 | export const indentString = (str: string, indentLevel: number = 2): string => { |
| 3 | // const options = { |
| 4 | // includeEmptyLines: false, |
| 5 | // }; |
| 6 | |
| 7 | // const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; |
| 8 | const regex = /^(?!\s*$)/gm; |
| 9 | return str.replace(regex, " ".repeat(indentLevel)); |
| 10 | }; |
| 11 | |
| 12 | export const indentStringFlutter = ( |
| 13 | str: string, |
no outgoing calls
no test coverage detected