dinject
v1.0.0
Published
Effortless dependency injection in JavaScript
Downloads
6
Readme
dinject
The purpose of this package is to provide effortless dependency injection to JavaScript. Below is a basic example showing how to use this package in Node.js.
var dinject = require('dinject');
dinject.inject('one', 1);
dinject.inject('two', 2);
dinject.inject('three', function(one, two) {
return one + two;
});
dinject.call(function(one, two, three) {
console.log('one:', one);
console.log('two:', two);
console.log('three:', three);
});