parseEnv
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' }
Content copied to clipboard
Since
v20.12.0
Parameters
content
The raw contents of a .env
file.