npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

env-globals

v1.0.7

Published

All flags and env variables are added to the global object, from both process.env an a .env file if it exists.

Readme

env-globals

All flags and env variables are added to the global object, from both process.env and a .env file if it exists.

Conflicts:

In case of conflicts that arise, no existing variable will be overwritten. Firstly flags are set, so if there are variable names already globaly set that are conflicting, then these conflicting flag variables are ignored. Next we do the same for the variables from the .env file(if exists), these are added to the global object unless theres an existing variable with the same name, at which point it will be ignored. Then finally we do the same again for the variables in process.env.


require( 'env-globals' );

console.log( 'global : ', global );

/*

    global : {
        global                    : [Circular *1],
        clearInterval             : [Function: clearInterval],
        clearTimeout              : [Function: clearTimeout],
        setInterval               : [Function: setInterval],
        setTimeout                : [Function: setTimeout] {
            [Symbol(util.promisify.custom)]: [Function (anonymous)]
        },
        queueMicrotask            : [Function: queueMicrotask],
        clearImmediate            : [Function: clearImmediate],
        setImmediate              : [Function: setImmediate] {
            [Symbol(util.promisify.custom)]: [Function (anonymous)]
        },

        // from flag
        test                      : 'value',
        t                         : undefined,

        // from .env file
        DB_HOST                   : localhost,
        DB_USER                   : root,
        DB_PASS                   : s1mpl3,

        // from process.env
        SSH_AGENT_PID             : '9183',
        TERM_PROGRAM              : 'Apple_Terminal',
        SHELL                     : '/bin/bash',
        TERM                      : 'xterm-256color',
        TMPDIR                    : '/var/folders/4d/6xspbvt93y3cymj5nhzv4yf8jmvq6s/T/',
        TERM_PROGRAM_VERSION      : '433',
        OLDPWD                    : '/Users/austin.kershaw/work/samples',
        TERM_SESSION_ID           : '5E28CD78-46C8-4F9D-ACC5-9AFDC36EAE7A',
        USER                      : 'austin.kershaw',
        SSH_AUTH_SOCK             : '/var/folders/4d/6xspbvt93y3cymj5nhzv4yf8jmvq6s/T//ssh-yiGrVeiYBfnL/agent.9182',
        PATH                      : '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
        PWD                       : '/Users/austin.kershaw/work/samples/env-globals',
        LANG                      : 'en_GB.UTF-8',
        XPC_FLAGS                 : '0x0',
        XPC_SERVICE_NAME          : '0',
        SHLVL                     : '1',
        HOME                      : '/Users/austin.kershaw',
        LOGNAME                   : 'austin.kershaw',
        _                         : '/usr/local/bin/node',
        __CF_USER_TEXT_ENCODING   : '0x234DDCD9:0:2'
    }

/*