Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

dotenv-stringify

Build Status Dependency Status Download Status Sponsor on GitHub

Compose a envfile string from an object, per the motdotla/dotenv parser specifications. Objects stringified using this package will be parsable by dotenv.parse().

Installation

$ npm install dotenv-stringify

Usage

Node.js 10+:

const fs = require('fs');
const { stringify } = require('dotenv-stringify');
const envstr = stringify(process.env);
fs.writeFileSync('.env', envstr);

In-browser or older Node.js environments:

var fs = require('fs');
var stringify = require('dotenv-stringify/dist/es5').stringify;
var envstr = stringify(process.env);
fs.writeFileSync('.env', envstr);

License

MIT License

About

Compose a envfile string from an object

Topics

Resources

License

Sponsor this project

 

Packages

No packages published