Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
denoland/stdWorks with
•JSR Score94%•This package works with DenoIt is unknown whether this package works with Bun

License
•MIT
Downloads42,402/wk
•Published14 hours ago (0.225.7)
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";