Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

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
20,107,138
increased by3.87%

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 16,887,685 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 because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 10 Jul 2018

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
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