( str: string, indentLevel: number = 2, )
| 10 | }; |
| 11 | |
| 12 | export const indentStringFlutter = ( |
| 13 | str: string, |
| 14 | indentLevel: number = 2, |
| 15 | ): string => { |
| 16 | // const options = { |
| 17 | // includeEmptyLines: false, |
| 18 | // }; |
| 19 | |
| 20 | // const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; |
| 21 | const regex = /^(?!\s*$)/gm; |
| 22 | return str.replace(regex, " ".repeat(indentLevel)); |
| 23 | }; |
no outgoing calls
no test coverage detected