
Product
Introducing License Overlays: Smarter License Management for Real-World Code
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Environment variable loader
The 'env voodoo' under the hood is node streams! (FTW)
This module loads environment files into process.env for you. By default it looks for a .env file in your project root but you can pass in a path to any other files you might wish to load environment variables from.
Loading a .env file in the root of the project
require('envoodoo')()
Loading a file somewhere else
var envoodoo = require('envoodoo')
envoodoo('path/to/.env')
// or
envoodoo('path/to/.env', function(err) {
// do something
})
Loading multiple files
var envoodoo = require('envoodoo')
envoodoo() //loads default .env
envoodoo('path/to/file1')
envoodoo('path/to/file2')
envoodoo generally handles simple KEY=VALUE .env files.
However, note the following:
# My .env file
# user information
NAME=bob
AGE=31
# using export keyword
export ANIMAL=cat
# crazy key strings with weird characters
KEY1='12@3$%^asd'
KEY2="12@3$%^asd"
If this file were to be loaded with envoodoo, then:
process.env.NAME === 'bob'
process.env.AGE === '31'
process.env.ANIMAL === 'cat'
process.env.KEY1 === '12@3$%^asd'
process.env.KEY2 === '12@3$%^asd'
FAQs
Environment variable loader
The npm package envoodoo receives a total of 547 weekly downloads. As such, envoodoo popularity was classified as not popular.
We found that envoodoo 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
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.