dinject

1.0.0 • Public • Published

dinject

npm version build status code climate test coverage github issues dependencies dev dependencies downloads

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);
});

Readme

Keywords

Package Sidebar

Install

npm i dinject

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bakerface