Skip to content

stagas/injectable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

injectable

dependency injection

example

var injectable = require('injectable');

var context = {
  foo: 'bar'
, hello: 'world'
};

var inject = injectable(context);

inject(function(foo, hello){
  console.log(foo); // 'bar'
  console.log(hello); // 'world'
});

License

MIT

About

dependency injection

Resources

Stars

Watchers

Forks

Packages

No packages published