{"id":15814228,"url":"https://github.com/stevenvachon/edit-dotenv","last_synced_at":"2025-03-14T20:32:06.558Z","repository":{"id":54301133,"uuid":"96718852","full_name":"stevenvachon/edit-dotenv","owner":"stevenvachon","description":"Edit a .env file string with preserved comments and whitespace.","archived":false,"fork":false,"pushed_at":"2020-06-01T01:19:34.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-06T04:23:31.128Z","etag":null,"topics":["comments","dotenv","nodejs","whitespace"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevenvachon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-10T00:03:34.000Z","updated_at":"2024-03-27T14:27:09.000Z","dependencies_parsed_at":"2022-08-13T11:20:58.107Z","dependency_job_id":null,"html_url":"https://github.com/stevenvachon/edit-dotenv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fedit-dotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fedit-dotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fedit-dotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fedit-dotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevenvachon","download_url":"https://codeload.github.com/stevenvachon/edit-dotenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221507521,"owners_count":16834510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comments","dotenv","nodejs","whitespace"],"created_at":"2024-10-05T04:23:42.593Z","updated_at":"2024-10-26T07:08:24.227Z","avatar_url":"https://github.com/stevenvachon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edit-dotenv [![NPM Version][npm-image]][npm-url] [![Linux Build][travis-image]][travis-url] [![Windows Build][appveyor-image]][appveyor-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Monitor][greenkeeper-image]][greenkeeper-url]\n\n\u003e Edit a `.env` file string with preserved comments and whitespace.\n\n\n## Installation\n\n[Node.js](http://nodejs.org/) `\u003e= 6` is required. To install, type this at the command line:\n```shell\nnpm install edit-dotenv\n```\n\n\n## Usage\n\n```js\nconst editDotenv = require('edit-dotenv');\n\nconst envString = `VAR1=value\nVAR2=value\n\n# Comment\nVAR3=value\\\\nvalue`;\n\nconst changes = {\n  VAR2: 'new value',\n  NEW: 'value'\n};\n\neditDotenv(envString, changes);\n/*↴\nVAR1=value\nVAR2=new value\n\n# Comment\nVAR3=value\\\\nvalue\n\nNEW=value\n*/\n```\n\n\n[npm-image]: https://img.shields.io/npm/v/edit-dotenv.svg\n[npm-url]: https://npmjs.com/package/edit-dotenv\n[travis-image]: https://img.shields.io/travis/stevenvachon/edit-dotenv.svg?label=linux\n[travis-url]: https://travis-ci.org/stevenvachon/edit-dotenv\n[appveyor-image]: https://img.shields.io/appveyor/ci/stevenvachon/edit-dotenv.svg?label=windows\n[appveyor-url]: https://ci.appveyor.com/project/stevenvachon/edit-dotenv\n[coveralls-image]: https://img.shields.io/coveralls/stevenvachon/edit-dotenv.svg\n[coveralls-url]: https://coveralls.io/github/stevenvachon/edit-dotenv\n[greenkeeper-image]: https://badges.greenkeeper.io/stevenvachon/edit-dotenv.svg\n[greenkeeper-url]: https://greenkeeper.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fedit-dotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenvachon%2Fedit-dotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fedit-dotenv/lists"}