deject

0.2.3 • Public • Published

Dependency Injection

This is a simple package for dependency injection.

Usage

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

module.exports = {
    factory: {
        ...
    },
    register: {
        ...
    }
}

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Package Sidebar

Install

npm i deject

Weekly Downloads

1

Version

0.2.3

License

MIT

Unpacked Size

5.2 kB

Total Files

6

Last publish

Collaborators

  • mmahrous