
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
@tuplo/envsubst
Advanced tools
Substitutes the values of environment variables. Based on GNU envsubst.
import envsubst from '@tuplo/envsubst';
Substitutes the values of environment variables
process.env = { ENV_VAR1: 'bar' };
envsubst('foo=$ENV_VAR1'); // → foo=bar
envsubst('foo=${ENV_VAR1}'); // → foo=bar
envsubst('foo={{ENV_VAR1}}'); // → foo=bar
If shellFormat
is present, replaces only those variables
process.env = { ENV_VAR1: 'bar', ENV_VAR2: 'baz' };
envsubst('$ENV_VAR1 $ENV_VAR2', '$ENV_VAR2'); // → $ENV_VAR1 baz
A string with references to environment variables of the form $VARIABLE
, ${VARIABLE}
or {{VARIABLE}}
.
The output consists of the environment variables that are referenced in shellFormat
.
$ npm install @tuplo/envsubst
# or with yarn
$ yarn add @tuplo/envsubst
Contributions are always welcome!
MIT
FAQs
Substitutes environment variables in strings
The npm package @tuplo/envsubst receives a total of 480 weekly downloads. As such, @tuplo/envsubst popularity was classified as not popular.
We found that @tuplo/envsubst 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.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.