parseEnv

external fun parseEnv(content: String): Any(source)

Stability: 1.1 - Active development Given an example .env file:

const { parseEnv } = require('node:util');

parseEnv('HELLO=world\nHELLO=oh my\n');
// Returns: { HELLO: 'oh my' }

Since

v20.12.0

Parameters

content

The raw contents of a .env file.