New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@avanio/variable-util-node

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avanio/variable-util-node

nodejs env util

latest
Source
npmnpm
Version
1.3.2
Version published
Weekly downloads
11
57.14%
Maintainers
3
Weekly downloads
 
Created
Source

@avanio/variable-util-node

TypeScript npm version Maintainability Code Coverage variable-util to npmjs

NodeJS loaders for @avanio/variable-util

install

npm i @avanio/variable-util @avanio/variable-util-node --save

Documentation

Examples

setLogger(console); // or log4js or winston
// Docker secret files
const dockerEnv = new DockerSecretsConfigLoader({fileLowerCase: true}).getLoader;
// settings json file (i.e. modified on pipeline or agent)
const fileEnv = new FileConfigLoader({fileName: './settings.json', type: 'json'}).getLoader;
const fileEnv = new FileConfigLoader(async () => ({fileName: './settings.json', type: 'json'})).getLoader;

const urlParser = new UrlParser({urlSanitize: true}); // urlSanitize hides credentials from logs

// lookup from: env => JSON file "settings.json" => Docker "/run/secrets/database_uri"
const databaseUrl: URL = await getConfigVariable('DATABASE_URI', [env(), fileEnv(), dockerEnv()], urlParser, undefined, {showValue: true});

// example override key: env => JSON file "settings.json" => Docker "/run/secrets/xxyyzz-database"
const databaseUrl: URL = await getConfigVariable('DATABASE_URI', [env(), fileEnv(), dockerEnv('xxyyzz-database')], urlParser, undefined, {showValue: true});

// lookup from: env => JSON file "settings.json" with key MONGODB => Docker "/run/secrets/database_uri"
const databaseUrl: URL = await getConfigVariable('DATABASE_URI', [env(), fileEnv('MONGODB'), dockerEnv()], urlParser, undefined, {showValue: true});

FAQs

Package last updated on 25 Feb 2026

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