# env-res

> Use `process` to set and get value from different file during runtime.

Latest version **1.0.5** (published 2022-09-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install env-res
pnpm add env-res
yarn add env-res
bun add env-res
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-09-07 |
| First published | 2022-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jxmked |
| Maintainers | jxmked |
| Keywords | object, map-object, map, env-variables, environment-variable, env, runtime-variables |

## Links

- npm: https://www.npmjs.com/package/env-res
- Repository: https://github.com/jxmked/NPM-Environment-Variables
- Homepage: https://github.com/jxmked/NPM-Environment-Variables#readme
- Issues: https://github.com/jxmked/NPM-Environment-Variables/issues
- npm.io page: https://npm.io/package/env-res

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2022-09-07
- 1.0.4 — 2022-09-04
- 1.0.3 — 2022-09-04
- 1.0.2 — 2022-09-03
- 1.0.1 — 2022-09-03
- 1.0.0 — 2022-09-03

## README

# NPM-Environment-Variables
Use `Map` and `process` to set and get value from different file during runtime.
 
> Using `Map` object to easily access global variables from different files


## Installation

`npm i --save env-res`

## Usage

__JavaScript__

```js
// index.js
const env = require('env-res');
const global_config = require("./global-config.js");

console.log(env.get("foo")); // bar

```

```js
// global-config.js
const env = require('env-res');

env.set("foo", "bar");
```

__TypeScript__

```TypeScript
// index.ts
import env from 'env-res';
import global_config from './global-config.ts';

console.log(env.get("foo")); // bar
```

```TypeScript
// global-config.ts
import env from 'env-res';

env.set("foo", "bar");
```

----

#### Written by Jovan De Guia

## Socials

- [Github](https://github.com/jxmked)
- [Facebook](https://www.facebook.com/deguia25)

---
_Source: https://npm.io/package/env-res · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
