(str: string, rgx: RegExp)
| 1145 | } |
| 1146 | |
| 1147 | function searchLast(str: string, rgx: RegExp): number { |
| 1148 | const matches = Array.from(str.matchAll(rgx)) |
| 1149 | return matches.length > 0 ? matches.slice(-1)[0].index : -1 |
| 1150 | } |
| 1151 | |
| 1152 | /** |
| 1153 | * Creates a `ConfigProvider` by reading and parsing a `.env` file from the |