scottcorgan / Injector

Node.js directory-independent dependency injection for apps and testing.
36 stars 1 forks source link

"inject" method to require modules in node_modules #27

Closed scottcorgan closed 11 years ago

scottcorgan commented 11 years ago
exports.someModule = function (inject, anotherModule) {
  var request = inject('request');
};

This is helpful for mocking the request module for testing.