0.0.4-dev • Published 7 months ago

@khapu2906/cosmos v0.0.4-dev

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

This package was developed to provide a simple and flexible Inversion of Control (IoC) container for TypeScript projects.


Install

npm install @khapu2906/cosmos
#or
yarn add @khapu2906/cosmos

Usage

Importing Modules

import { Container } from "@khapu2906/cosmos";

Initializing the Container

To initialize the container, create an instance of the Container class:

const container = new Container();

Binding Services

You can bind services to the container using the bind method:

container.bind('myService', () => new MyService());

Resolving Services

You can resolve services from the container using the get method:

const myService = container.get('myService');

Author

More

Modules

License

IoC is open-sourced software licensed under the MIT license.

0.0.4-dev

7 months ago

0.0.3-dev

7 months ago

0.0.2-dev

7 months ago

0.0.1-dev

7 months ago