function parseEnv
Jump to headingparseEnv(content: string): object
Stability: 1.1 - Active development
Given an example .env
file:
import { parseEnv } from 'node:util';
parseEnv('HELLO=world\nHELLO=oh my\n');
// Returns: { HELLO: 'oh my' }
Parameters Jump to heading
Jump to headingcontent: string
The raw contents of a .env
file.
Return Type Jump to heading
object