Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
denoland/stdUNSTABLE: Parsing and loading environment variables from a `.env` file
This package works with DenoIt is unknown whether this package works with Bun
JSR Score
94%
Published
3 months ago (0.225.2)
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
View transparency logGitHub Actions
Add Package
deno add jsr:@std/dotenv
Import symbol
import * as dotenv from "@std/dotenv";
---- OR ----
Import directly with a jsr specifier
import * as dotenv from "jsr:@std/dotenv";
Add Package
bunx jsr add @std/dotenv
Import symbol
import * as dotenv from "@std/dotenv";