Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/dotenv/mod.ts>parse

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function parse
Re-export
import { parse } from "https://deno.land/std@0.220.0/dotenv/mod.ts";

Parse .env file output in an object.

Examples

Example 1

import { parse } from "https://deno.land/std@0.220.0/dotenv/parse.ts";

const env = parse("GREETING=hello world");
env.GREETING; // "hello world"

Parameters

rawDotenv: string

Returns

Record<string, string>