Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

env-editor

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-editor

Get metadata on the default editor or a specific editor

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
786K
increased by2.05%
Maintainers
1
Weekly downloads
 
Created

What is env-editor?

The env-editor npm package is designed to help developers manage and edit environment variables in their projects. It provides a simple interface to read, write, and manipulate .env files, making it easier to handle configuration settings for different environments.

What are env-editor's main functionalities?

Read Environment Variables

This feature allows you to read the environment variables from a .env file. The code sample demonstrates how to read the .env file and log the variables to the console.

const envEditor = require('env-editor');
const env = envEditor.read('.env');
console.log(env);

Write Environment Variables

This feature allows you to write new environment variables to a .env file. The code sample shows how to create a new set of environment variables and write them to the .env file.

const envEditor = require('env-editor');
const newEnv = { NODE_ENV: 'production', API_KEY: '12345' };
envEditor.write('.env', newEnv);

Update Environment Variables

This feature allows you to update existing environment variables in a .env file. The code sample demonstrates how to update the API_KEY variable in the .env file.

const envEditor = require('env-editor');
const updates = { API_KEY: '67890' };
envEditor.update('.env', updates);

Other packages similar to env-editor

Keywords

FAQs

Package last updated on 24 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc