simpledi-jr

1.2.0 • Public • Published

Just a Simple Dependency injection helper class for inject services. Its use is very easy, i use in react projects to access services for call REST.

Use case: In main file of the project just create your services an set into DI object

import {DI} from "simpledi-jr";

let service = new Service();
DI.add(service);
// or // 
let service2 = new Service();
DI.add(service,"service2");

Later to acess de services just use.

let service = DI.get(Service);

// or //

let service2 = DI.get("service2");

Package Sidebar

Install

npm i simpledi-jr

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

11.7 kB

Total Files

7

Last publish

Collaborators

  • jrsanchezalcala