Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Edit, Save or Load variables from .env ( For Nodejs )
Since motdotla/dotenv can load variables from .env but can't save modified variables into .env, I just want to create this stuff.
const dotenv = require("parsenv");
const dotenv = require("parsenv");
dotenv.edit({ VARIABLE: "value", ANOTHER: "another" });
const dotenv = require("parsenv");
dotenv.write();
const parsenv = require("../src");
const p = require("path");
parsenv.config();
parsenv.edit({ NAME: "NAME CHANGED", ANOTHER_VARIABLE: "BAZ" });
parsenv.write({ path: p.join(__dirname, "../.env.modified") });
const dotenv = require("parsenv");
const config = {
path: require('path').resolve(process.cwd(), ".env") // default
encoding: 'utf8' // default
debug: false // default
};
// config can apply to dotenv.config function
dotenv.config(config);
// also pass it to dotenv.write function
dotenv.write(config);
These settings and variables can be modified through global.parsenv.setting
and global.parsenv.env
. But recommend edit
method to change variable
ParsEnv
is licensed under the MIT license. See License for more information.
FAQs
Edit, Save or Load variables from .env ( For Nodejs )
The npm package parsenv receives a total of 3 weekly downloads. As such, parsenv popularity was classified as not popular.
We found that parsenv demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.