Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 6, 2024 via pnpm

loose-envify 1.4.0

Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST
Package summary
Share
0
issues
1
license
2
MIT
Package created
21 Sep 2015
Version published
10 Jul 2018
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
js-tokens@4.0.0
loose-envify@1.4.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
ⓘ This is a list of loose-envify 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
js-tokens4.0.06.39 kBMIT
prod

Visualizations

Frequently Asked Questions

What does loose-envify do?

Loose-envify is a fast and selective process.env replacer that leverages js-tokens instead of an abstract syntax tree (AST). This npm package operates in a similar manner to envify, but delivers much faster performance.

How do you use loose-envify?

To use loose-envify in your JavaScript project, you need to interact with its interface which matches that of envify, including the Command Line Interface (CLI). However, loose-envify does not handle broken syntax, it does not look within embedded expressions in template strings, and it does not replace oddly-spaced or oddly-commented expressions.

For instance, the following pieces of code do not work with loose-envify:

console.log(`the current environment is ${process.env.NODE_ENV}`);
console.log(process./*won't*/env./*work*/NODE_ENV);

But a correct usage would be:

console.log(process.env.NODE_ENV);

This correctly logs the current environment's NODE_ENV value, by replacing process.env.NODE_ENV with its respective value.

Where are the loose-envify docs?

The documentation for loose-envify is primarily present within the README file in the package’s GitHub repository. You can find comprehensive information on the usage, pitfalls and benchmarks of this npm package at https://github.com/zertosh/loose-envify.