Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxkomarychev/mioc
A zero dependency micro IoC framework
https://github.com/maxkomarychev/mioc
decorators dependency-injection inject injection ioc ioc-container
Last synced: 5 days ago
JSON representation
A zero dependency micro IoC framework
- Host: GitHub
- URL: https://github.com/maxkomarychev/mioc
- Owner: maxkomarychev
- License: mit
- Created: 2020-06-07T08:20:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T08:20:03.000Z (almost 2 years ago)
- Last Synced: 2024-11-18T18:09:08.443Z (about 1 month ago)
- Topics: decorators, dependency-injection, inject, injection, ioc, ioc-container
- Language: JavaScript
- Homepage:
- Size: 373 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# mioc
A zero dependency micro IoC framework
## API
```js
const { container, registry, decorators } = require("mioc");// register factories
container.setProvider("logger", () => console);// decorate
@decorators.classDecorator
class Recipient {
@decorators.propertyDecorator("logger") logger = undefined;
}const recipient = new Recipient();
recipient.logger.log("hello, world!");
```