Skip to main content
parseEnv - node__util.d.ts - Node documentation
function parseEnv

Usage in Deno

```typescript import { parseEnv } from "node:node__util.d.ts"; ```
parseEnv(content: string): object
Stability: 1.1 - Active development Given an example `.env` file: ```js import { parseEnv } from 'node:util'; parseEnv('HELLO=world\nHELLO=oh my\n'); // Returns: { HELLO: 'oh my' } ```

Parameters

content: string
The raw contents of a `.env` file.

Return Type

object