loose-envify
npmv1.4.0Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST
Not recommended for new projects
No — loose-envify should not be adopted for new projects. Last published 2983 days ago.
- AAdoption: grade A, Excellent.
65M downloads per week and 2 known dependents.
- FMaintenance: grade F, Failing.
Last published 2983 days ago.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 5.7 KB installed (at least — some of the tree is still being crawled).
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding loose-envify to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Part of this dependency tree has not been crawled yet, so these figures are a lower bound rather than a final total.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the loose-envify README.
console.log(`the current env is ${process.env.NODE_ENV}`);loose-envify vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| loose-envifythis page | 65M | 2 | MIT | 8 years ago |
| strip-json-comments | 0 | 2 | MIT | 1 day ago |
| getenv | 0 | 7 | MIT | 1 day ago |
| postcss | 249.3M | 7 | MIT | 1 day ago |
| path-key | 244.9M | 1 | MIT | 1 day ago |
| @jridgewell/gen-mapping | 163.4M | 4 | MIT | 1 day ago |
Dependencies
Declared by loose-envify v1.4.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (3)
Used by
Popular packages that depend on loose-envify.
Relationship graph
Dependencies (left) and dependents (right) of loose-envify.
Frequently installed together
A shim for the setImmediate efficient script yielding API
Universal WHATWG Fetch API for Node, Browsers and React Native
This package exports a few of the CSS variables that we use in Facebook projects. This is not the full list we have internally but focused on making available the minimum set needed by our open source projects.
Delightful JavaScript Testing.
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent & Client Hints data. Supports browser & node.js environment
Bare bones Promises/A+ implementation
Immutable Data Collections
Create a stream that emits events from multiple other streams
Release history
No releases in the last two years, typically about 167 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.4.0latest | 8 years ago | 5.7 KB | MIT |
| 1.3.1 | 9 years ago | — | MIT |
| 1.3.0 | 10 years ago | — | MIT |
| 1.2.0 | 10 years ago | — | MIT |
| 1.1.0 | 11 years ago | — | MIT |
| 1.0.0 | 11 years ago | — | MIT |
Overview
loose-envify is an npm package that fast (and loose) selective `process.env` replacer using js-tokens instead of an AST. It is extremely widely used, with about 65M downloads per week and 2 known dependents in the graph. The latest version is 1.4.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need fast (and loose) selective `process.env` replacer using js-tokens instead of an AST and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (65M weekly downloads).
- Clear open-source license (MIT).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use loose-envify?
No — loose-envify should not be adopted for new projects. Last published 2983 days ago.
How do I install loose-envify?
Run `npm install loose-envify` to add loose-envify to your npm project.
How many dependencies does loose-envify have?
loose-envify declares 4 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 5.7 KB on disk.
What license is loose-envify released under?
loose-envify is distributed under the MIT license.
How popular is loose-envify?
loose-envify has approximately 65,032,549 downloads per week and 2 known dependent packages.
Is loose-envify still maintained?
The most recent release of loose-envify (v1.4.0) was published 8 years ago.
Does loose-envify run install scripts?
No. loose-envify does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.