Compose a envfile string from an object, per the motdotla/dotenv parser specifications. Objects stringified using this package will be parsable by dotenv.parse()
.
$ npm install @boundstate/dotenv-stringify
import fs from 'fs'
import stringify from '@boundstate/dotenv-stringify'
const envstr = stringify(process.env);
fs.writeFileSync('.env', envstr);
MIT License