@gingacodemonkey/update-dotenv
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

update-dotenv

A fork of davehensley/update-dotenv, which is a fork of bkeepers/update-dotenv

This adds support for wrapping lines with special characters (space or $) with a ' (single quote).

A NodeJS module to write updates to a .env file

Installation

// pnpm
pnpm add dotenv @gingacodemonkey/update-dotenv

// npm
npm install dotenv @gingacodemonkey/update-dotenv

//jsr
npx jsr add @gingacodemonkey/update-dotenv
pnpm dlx jsr add @gingacodemonkey/update-dotenv

Usage

MJS

import updateDotenv from'@gingacodemonkey/update-dotenv'

updateDotenv({
  MY_VARIABLE: 'new value'
}).then((newEnv) => console.log('Done!', newEnv))

CJS

const {default: updateDotenv} = require('@gingacodemonkey/update-dotenv');

updateDotenv({
  MY_VARIABLE: 'new value'
}).then((newEnv) => console.log('Done!', newEnv))

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i @gingacodemonkey/update-dotenv

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

9.21 kB

Total Files

7

Last publish

Collaborators

  • gingacodemonkey