This release is versions behind 0.225.7 — the latest version of @std/dotenv.
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Works with
•JSR Score94%•This package works with DenoIt is unknown whether this package works with Bun

Downloads46,085/wk
•Published2 years ago (0.225.1)
UNSTABLE: Parsing and loading environment variables from a `.env` file
Parses and loads environment variables from a .env file into the current
process, or stringify data into a .env file format.
Note: The key needs to match the pattern /^[a-zA-Z_][a-zA-Z0-9_]*$/.
// Automatically load environment variables from a `.env` file import "@std/dotenv/load";
import { parse, stringify } from "@std/dotenv"; import { assertEquals } from "@std/assert"; assertEquals(parse("GREETING=hello world"), { GREETING: "hello world" }); assertEquals(stringify({ GREETING: "hello world" }), "GREETING='hello world'");
Built and signed on
GitHub Actions
Add Package
deno add jsr:@std/dotenv
Import symbol
import * as dotenv from "@std/dotenv";
Import directly with a jsr specifier
import * as dotenv from "jsr:@std/dotenv";