Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zkochan/subenv

Returns all the environment variables that are prefixed with the specified value
https://github.com/zkochan/subenv

Last synced: 3 months ago
JSON representation

Returns all the environment variables that are prefixed with the specified value

Awesome Lists containing this project

README

        

# subenv

> Returns all the environment variables that are prefixed with the specified value

[![npm version](https://img.shields.io/npm/v/subenv.svg)](https://www.npmjs.com/package/subenv) [![Build Status](https://img.shields.io/travis/zkochan/subenv/master.svg)](https://travis-ci.org/zkochan/subenv)

## Installation

```sh
npm i -S subenv
```

## Usage

```js
'use strict'
const subenv = require('subenv')

process.env.capitals_USA = 'Washington'
process.env.capitals_hungary = 'Budapest'

console.log(subenv('capitals'))
//> { usa: 'Washington', hungary: 'Budapest' }
```

## License

[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io)