Buckets:
| # loose-envify | |
| [](https://travis-ci.org/zertosh/loose-envify) | |
| Fast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster. | |
| ## Gotchas | |
| * Doesn't handle broken syntax. | |
| * Doesn't look inside embedded expressions in template strings. | |
| - **this won't work:** | |
| ```js | |
| console.log(`the current env is ${process.env.NODE_ENV}`); | |
| ``` | |
| * Doesn't replace oddly-spaced or oddly-commented expressions. | |
| - **this won't work:** | |
| ```js | |
| console.log(process./*won't*/env./*work*/NODE_ENV); | |
| ``` | |
| ## Usage/Options | |
| loose-envify has the exact same interface as [envify](https://github.com/hughsk/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 | |
| ``` | |
Xet Storage Details
- Size:
- 1.07 kB
- Xet hash:
- af3d0602402cfcaecc004d2765ae276fb6d4d39f201c14d71f1e8a2e9f54f78f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.