node-shark-di
Easy to use, non-intrusive and friendly dependency-injection (DI) container for node.
NPM Install
$ npm install shark-di --save-dev
Basic Usage
You can get the complete sample here node-shark-di-sample
const container = BootstrapContainer; // weapon factory { return name: 'sword' damage: 25; } // warrior constructor { thisweapon = weapon; this{ console; } } container; container; container;
Promise based factories
Just return a promise/A+ in your factory.
container;
Sample using RSVP Promise/A+ Library
const RSVP = ; container;