Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 2 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-02T17:34:42.000Z (3 months ago)
- Last Synced: 2024-10-27T13:02:48.232Z (about 2 months ago)
- Topics: dotenv, envfile-string, npm
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/dotenv-stringify
- Size: 1.22 MB
- Stars: 4
- Watchers: 3
- 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
[![Build Status](https://app.travis-ci.com/compwright/dotenv-stringify.svg?branch=master)](https://app.travis-ci.com/github/compwright/dotenv-stringify)
[![Download Status](https://img.shields.io/npm/dm/dotenv-stringify.svg?style=flat-square)](https://www.npmjs.com/package/dotenv-stringify)
[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=❤&logo=GitHub&link=https://github.com/sponsors/compwright)](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