An open API service indexing awesome lists of open source software.

https://github.com/bytespider/dependency-manager

Simple dependency injection manager
https://github.com/bytespider/dependency-manager

Last synced: about 1 year ago
JSON representation

Simple dependency injection manager

Awesome Lists containing this project

README

          

#Simple dependency injection manager
Creates instances of objects initialised with a graph of dependencies.

var di = new DependencyManager();
di.register(Apple); // has no dependencies
di.register(Peeler, {
'peelable': 'Apple' // property peelable initialised with Apple
});
di.register(Juicer, {
'peeler': 'Peeler', // property peeler initialised with Peeler
'peelable': 'Apple' // property peelable initialised with Apple
});

var jucer = di.create('Juicer');