(envFileString: string)
| 55 | * Parse out all env vars from a given env file string and return an object |
| 56 | */ |
| 57 | export function parseEnvString(envFileString: string): Environment { |
| 58 | // First thing we do is stripe out all comments |
| 59 | envFileString = stripComments(envFileString) |
| 60 | |
| 61 | // Next we stripe out all the empty lines |
| 62 | envFileString = stripEmptyLines(envFileString) |
| 63 | |
| 64 | // Merge the file env vars with the current process env vars (the file vars overwrite process vars) |
| 65 | return parseEnvVars(envFileString) |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Parse out all env vars from an env file string |
no test coverage detected