# @hikyu/env

> To install @hikyu/env, run the following command: ```bash npm install @hikyu/env ```

Latest version **1.0.10** (published 2022-12-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install @hikyu/env
pnpm add @hikyu/env
yarn add @hikyu/env
bun add @hikyu/env
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2022-12-16 |
| First published | 2022-12-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hikyu |

## Links

- npm: https://www.npmjs.com/package/@hikyu/env
- npm.io page: https://npm.io/package/@hikyu/env

## Dependencies (1)

- [path](https://npm.io/package/path.md) ^0.12.7

## Recent versions

- 1.0.10 (latest) — 2022-12-16
- 1.0.9 — 2022-12-08
- 1.0.8 — 2022-12-08

## README

To install @hikyu/env, run the following command:
```bash
npm install @hikyu/env
```

To use the package, require it in your project like so:
```js
require('@hikyu/env')(); // Path default to ./.env
require('@hikyu/env')('./.myEnv'); // File path is optional
```

# Usage

## Creating file
```
text=My Variable Text
anyNumber=1
```

## Getting variables
Using global.env
```js
console.log(global.env.text)
// Output: My Variable Text

console.log(env.anyNumber) // global is not needed (use only if no other env variable exists)
// Output: 1
```

Using proces.env
```js
console.log(process.env.text)
// Output: My Variable Text
```

# License
This package is licensed under the MIT License.

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