@flancer64/demo-di-lib
v0.3.0
Published
DI demo: shared library.
Downloads
4
Maintainers
Readme
demo-di-lib
This is a library package that demonstrates JavaScript code that can be used from both Node.js and browser apps without
requiring additional transformation. This sample is compatible with the DI container from the @teqfw/di
package.
The package contains 3 modules:
- src/Config.js: Just an object that contains hardcoded configuration.
- src/Logger.js: A factory to create a new function with one dependency (config).
- src/Service.js: A class to create new instances with 2 dependencies (config & logger).
See the @flancer64/demo-di-app package for an example of how to use this library.