
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
dotenv-touch
Advanced tools
Touch .env file from local environments and options
$ npm install --save dotenv-touch
const touch = require('dotenv-touch');
touch({
LANG: 'Us',
SHELL: 'zsh',
TEST: 1
}, {
breakLine: '\n'
})
//=> LANG=Us\nSHELL=zsh\nTEST=1
Type: object
Object which become to field-value
Type: 'String'
Path of output file. If it is not given skipping file writing.
Type: String
Default: \n
Characters for break a like aka CR/LF
$ npm install --global dotenv-touch
$ dotenv-touch --help
Usage
$ dotenv-touch [environments] [options]
Options
--process: true or list of name of environments in process.env to pick up
--output: path for env file
Examples,
$ dotenv-touch API_KEY=YOUR_APIKEY PRODUCTION=false SIGNATURE_ID=YOUR_ID,
$ dotenv-touch API_KEY=YOUR_APIKEY PRODUCTION=false --output=./config,
$ dotenv-touch --process,
$ dotenv-touch --process=SHELL,LOGNAME,LANG,
$ TEST=1 node cli.js API_KEY=key PRODUCTION=\my production\ --process=SHELL,LOGNAME,LANG,TEST,
>> SHELL: \/bin/zsh\,
LOGNAME: \ragingwind\,
LANG: \en_US.UTF-8\,
TEST: \1\,
API_KEY: \key\,
PRODUCTION: \my production\
MIT © ragingwind
FAQs
Touch .env file from local environments and options
The npm package dotenv-touch receives a total of 2 weekly downloads. As such, dotenv-touch popularity was classified as not popular.
We found that dotenv-touch 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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.