This is a simple, light weight Ioc library
Install with:
npm install qioc
Container Usage Example
var QIOC = ;; // create a containervar myContainer = QIOC; // add a service to a containermyContainer; // retrieve a service from a containervar service = myContainer; // remove a service from a containermyContainer;
Signal Usage Example
var QIOC = ;; // create a signalvar mySignal = QIOC; // create a receiver objectvar myTarget = { // do something thisx = value; }// subscribe the target to the signal// first argument will be bound to 'this' during calls// second argument is the handler functionmySingle; // fire the signal with some data// can also fire signals with arbitrary number of arguments/// mySignal.fire(1,2,myVar...)mySignal; // unsubscribe to a signalmySignal;
To run tests
mocha test --watch