Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

io-env

Lightweight, zero-dependency library to manipulate env files preserving its structure.

Installation

npm install io-env
# yarn add io-env
# pnpm add io-env

Usage

import { readEnvFile, writeEnvFile, getEnv, setEnv } from "io-env";

let content = await readEnvFile(".env.local");
if (getEnv("APP_SECRET") == null) {
  content = setEnv("APP_SECRET", generateNewSecret());
}
await writeEnvFile(".env.local", content);

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages