Module

std/dotenv/mod.ts>parse

Deno standard library
Go to Latest
function parse
import { parse } from "https://dotland.deno.dev/std@0.221.0/dotenv/mod.ts";

Parse .env file output in an object.

Examples

Example 1

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

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

Parameters

rawDotenv: string

Returns

Record<string, string>
import parse
import { parse } from "https://dotland.deno.dev/std@0.221.0/dotenv/mod.ts";

Parses and loads environment variables from a .env file into the current process, or stringify data into a .env file format.