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

https://github.com/mmahrous/deject

A simple dependency injector.
https://github.com/mmahrous/deject

Last synced: about 2 months ago
JSON representation

A simple dependency injector.

Awesome Lists containing this project

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.