# deject

> A simple dependency injector.

Latest version **0.2.3** (published 2022-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install deject
pnpm add deject
yarn add deject
bun add deject
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2022-03-16 |
| First published | 2020-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | M.Mahrous |
| Maintainers | mmahrous |
| Keywords | dependency, injection, factory |

## Links

- npm: https://www.npmjs.com/package/deject
- Repository: https://github.com/mmahrous/deject
- Homepage: https://github.com/mmahrous/deject#readme
- Issues: https://github.com/mmahrous/deject/issues
- npm.io page: https://npm.io/package/deject

## Dependencies (1)

- [fn-args](https://npm.io/package/fn-args.md) 5.0.0

## Recent versions

- 0.2.3 (latest) — 2022-03-16
- 0.2.2 — 2020-07-22
- 0.2.1 — 2020-07-22

## README

# Dependency Injection
This is a simple package for dependency injection.

### Usage 
```JS
const config = require('./config')
const DI = require('deject')(config)
DI.register('port', port)
DI.register('name', name)
DI.get('server')
```
### Configuration
This DI needs a configuration as config.js file 
```JS
module.exports = {
    factory: {
        ...
    },
    register: {
        ...
    }
}
```
# License
This project is licensed under the MIT license. See the LICENSE file for more info.

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