scottcorgan / Injector

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

Provide a pre-inject interface #31

Open scottcorgan opened 11 years ago

scottcorgan commented 11 years ago
var config = {
  directory: path.join(__dirname, 'lib'),
  inject: {
    env: {
      name: 'env',
      definition: env
    }
  }
};
scottcorgan commented 11 years ago

Pre injected

// inject

exports.someModule = function () {
  this.env
}