not yet ready for production
use-module
angularjs-style DI for nodemodules
from
var _ = ;var fs = ;var path = ;var winston = ;
to
;
Installation
npm install use-module
API
init
Use this function to set the root of your module.
use.init(String folder)
use
Use this function to inject modules into your module.
use(function callback, Object mappings)
override
Use override in your tests to mock a module
use.override(String moduleName, Object module)
Usage
Make sure you checkout the examples.
- Setup
// setup your base folder in the root of your module; creates a global 'use'use; // this also clears all overriden modules.
// inject modules ; // map module name ; // inject local modules ; // mock a dependency use;