Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

dotenv-stringify

2.0.2 • Public • Published

dotenv-stringify

Build Status Dependency Status Download Status

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 8+:

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

Install

npm i dotenv-stringify

DownloadsWeekly Downloads

551

Version

2.0.2

License

MIT

Unpacked Size

7.19 kB

Total Files

6

Last publish

Collaborators

  • avatar