@empla/coredi
v2.0.4
Published
Dependency Injection library for Node.js and Browser
Maintainers
Readme
CoreDI
Dependency Injection library for Node.jS and Browser
Features
- Node.js and Browser support
- Well tested code
- Container fork support
- Recursive dependencies resolving support
- Service Groups support
Installation
npm install @empla/corediUsage
const coredi = require('@empla/coredi');
coredi({
app: {
loaders: [
{
name: 'myservice',
config: {
param: 'defaultValue'
},
async create(container) {
return myServiceObject;
},
},
],
},
}, 'app').then(function(container) {
const myservice = container('myservice');
// ...
});Documentation
Visit official site for documentation
How to build project
Install:
npm installTest:
npm testLint code:
npm run lintBrowser tests:
npm run bundleand open browser-test.html in your browser.
License
CoreDI licensed under MIT License
Maintainers
Copyright (c) 2020 EMPLA GROUP, LLP
Made with ❤️
