https://github.com/mwcz/pickenv
`process.env` too big? Get only the environment variables you want.
https://github.com/mwcz/pickenv
Last synced: 3 months ago
JSON representation
`process.env` too big? Get only the environment variables you want.
- Host: GitHub
- URL: https://github.com/mwcz/pickenv
- Owner: mwcz
- License: mit
- Created: 2020-02-13T20:05:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T18:05:32.000Z (about 4 years ago)
- Last Synced: 2025-03-17T17:09:28.603Z (3 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/js/pickenv)
# pickenv
`process.env` too big? Get only the environment variables you want.
## example
```
npm install --save pickenv
```Then write some regular expressions that match the environment variables you want to retrieve. This example retrieves all the envs that start with "HIST".
```
import pickenv from "pickenv";pickenv(["HIST.*"]);
// result:
// {
// HISTCONTROL: "ignoredups",
// HISTSIZE: "1000"
// }
```Why is this useful, you might ask? That's a good question.