DI
DI - Dependency Injection , Inversion of Control - IoC , for JS.
Install for node.js
npm install jsdi
Install for component
component install brighthas/jsdi
Example:
var DI = ;var Emitter = EventEmitter; { thisname = "brighthas";} Userprototype = changeName: var emitter = ;emitter; // injectUserprototypemy_ = emitter; // test run var user = ;user;
result is:
old name is brighthas is leo