https://github.com/danielwpz/innjector
Another dependency injection library for JS.
https://github.com/danielwpz/innjector
Last synced: 10 months ago
JSON representation
Another dependency injection library for JS.
- Host: GitHub
- URL: https://github.com/danielwpz/innjector
- Owner: danielwpz
- License: mit
- Created: 2017-07-13T22:50:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-03T03:43:55.000Z (over 7 years ago)
- Last Synced: 2025-08-23T09:37:35.858Z (10 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Innjector
Another dependency injection library for JS.
## Usage
```
const Innjector = require('innjector');
async function run() {
const injector = new Innjector();
await injector.load(process.cwd());
const baseModule = injector.container.get('yourApp');
yourApp.run();
}
```
In your module, the exported function should follow the convention of [dependable](https://github.com/testdouble/dependable) functions.
And if you want to override the name of the module, just do `module.exports._moduleName = 'myName'`.