Require Modifier (require-mod)
RequireMod is a NodeJS-Package which provides the functionality to modify the require-process of a nodejs-module instance.
Installation
This module is installed via npm:
$ npm install require-mod
Usage
Include the ProxyScope constructor:
var ProxyScope = ProxyScope;
Create a new proxyScope:
var scope = module;
Register a redirection:
scope; var fse = ; // the "fse" module instance
After the regitration the require function of the current module has been modified and loads the registered module-proxy
The Module is also Typescript compatible, you can use the mtype:require-mod to install the definitions.