Socket
Book a DemoInstallSign in
Socket

envies

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envies

Teeny tiny .env loader

latest
Source
npmnpm
Version
2.4.0
Version published
Maintainers
1
Created
Source

envies

Teeny tiny .env loader

Usage

import {env} from "envies";
console.log(env.USER);

Details

It loads variables in ascending precedence from the following sources:

  • .default.env in the script directory
  • .default.env in the working directory
  • .env in the script directory
  • .env in the working directory
  • .env.local in the script directory
  • .env.local in the working directory
  • The current environment variables

Notes

  • Variables are loaded on-demand once when properties on env are first accessed
  • The script directory is determined from process.argv[1]
  • To change the default source filenames, set ENVIES_SOURCES=.example.env,.env in the environment.

© silverwind, distributed under BSD licence

FAQs

Package last updated on 30 Oct 2025

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