Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
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 6 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.