1.4.0 • Published 6 years ago

loose-envify v1.4.0

Weekly downloads
13,794,872
License
MIT
Repository
github
Last release
6 years ago

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
invariantprop-typeswarningreact-transition-groupfbjscreate-react-class@skylarrr/sky-ui@huyhpham/rn-line@dyng/kdjsarchetype-librarycomponennentteasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-imagepipihomereact-virtualized-lexaglern-send-sms@tantei/react@icanpm/api-masterinject-modal@darcusfenix/react-redux@arisageha/react-lazyload@arisageha/react-lazyload-fix@cashremit/cr-streamline-iconsinvariant-esrn-device-informationreact-redux-combine-componentsreact-native-template-rfbaseairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@ihikmawan/tailwindcss-multi-theme-l2@borisovart/atol-kkt-module@phil8795/pecuniarius-apideneme323112@texttree/demo-bsa-reference-rcl@ntt_app/react-native-custom-notification@ubehebe/react-dom@ubehebe/reactreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modnew-rollup-testalex-frontend-sdk-stagingafryxiconsreact-native-thanh-toast-librarymutasi-bca@saunterer/react@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewerstaking_2.0@saeon/ol-react@saeon/quick-formcthpb-plugin-socialreact-native-printer-brothersrn-pdf-reader-offline@aw-web-design/react-virtualizedcbmis-ai-toolboxreact-native-shekhar-bridge-testcogoportutilscontus-mf-2uinz-notificationwilscanner@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-testreact-native-slider-kfhistory-with-raw-location@infinitebrahmanuniverse/nolb-loos@velusgautam/react-virtualized@neptuno-ui/system@prodam/prodam-types@oss-stealth/react@oss-stealth/react-domjumpsuit-cli@saaspe/componentshyperpass-sdkusegetdistanceexpand-react-bridgeluminos-ui-coresklif-ui-kitsklif-api@everything-registry/sub-chunk-2102jawwy-sdkjawwy_gamification_releaseydw-babeldemo@deepakorg/test@deepak757/testreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgcomponent-library-starter-packp149-tablehistory-tssklif-uimachinebeemrcapsreact-native-jawwy_sample
1.4.0

6 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

9 years ago

1.0.0

9 years ago