Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

loose-envify

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

loose-envify

Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST

    1.4.0latest

Version published
Maintainers
1
Weekly downloads
18,899,122
decreased by-0.76%

Weekly downloads

Readme

Source

loose-envify

Build Status

Fast (and loose) selective process.env replacer using js-tokens instead of an AST. Works just like envify but much faster.

Gotchas

  • Doesn't handle broken syntax.
  • Doesn't look inside embedded expressions in template strings.
    • this won't work:
    console.log(`the current env is ${process.env.NODE_ENV}`);
  • Doesn't replace oddly-spaced or oddly-commented expressions.
    • this won't work:
    console.log(process./*won't*/env./*work*/NODE_ENV);

Usage/Options

loose-envify has the exact same interface as envify, including the CLI.

Benchmark

envify: $ for i in {1..5}; do node bench/bench.js 'envify'; done 708ms 727ms 791ms 719ms 720ms loose-envify: $ for i in {1..5}; do node bench/bench.js '../'; done 51ms 52ms 52ms 52ms 52ms

Keywords

FAQs

What is loose-envify?

Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST

Is loose-envify popular?

The npm package loose-envify receives a total of 15,198,640 weekly downloads. As such, loose-envify popularity was classified as popular.

Is loose-envify well maintained?

We found that loose-envify demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 10 Jul 2018
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc