@flancer64/demo-di-lib

0.2.0 • Public • Published

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.

Package Sidebar

Install

npm i @flancer64/demo-di-lib

Weekly Downloads

0

Version

0.2.0

License

Apache-2.0

Unpacked Size

14.3 kB

Total Files

6

Last publish

Collaborators

  • flancer64