https://github.com/compwright/dotenv-stringify
Compose a envfile string from an object
https://github.com/compwright/dotenv-stringify
dotenv envfile-string npm
Last synced: 3 months ago
JSON representation
Compose a envfile string from an object
- Host: GitHub
- URL: https://github.com/compwright/dotenv-stringify
- Owner: compwright
- License: mit
- Created: 2016-12-29T17:42:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-02T17:34:42.000Z (9 months ago)
- Last Synced: 2025-04-06T13:07:32.159Z (3 months ago)
- Topics: dotenv, envfile-string, npm
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/dotenv-stringify
- Size: 1.22 MB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# dotenv-stringify
[](https://app.travis-ci.com/github/compwright/dotenv-stringify)
[](https://www.npmjs.com/package/dotenv-stringify)
[](https://github.com/sponsors/compwright)Compose a envfile string from an object, per the [motdotla/dotenv](https://github.com/motdotla/dotenv/) parser specifications. Objects stringified using this package will be parsable by `dotenv.parse()`.
## Installation
```
$ npm install dotenv-stringify
```## Usage
```js
import fs from 'fs'
import stringify from 'dotenv-stringify'
const envstr = stringify(process.env);
fs.writeFileSync('.env', envstr);
```## License
MIT License