wrap-module-function
Helper for override module.exports
to do something like middleware or wrap all exported function from all modules in specific path.
For example, logging excutation time for all modules in ./domains/...
directory or logging all function call on every function exported from module in ./utils/...
Installation
npm install --save wrap-module-function
Configuration
Please see more detail example on ./example
const wrapModule = // Must be call this before any require module
How it work
Override Module._load
based on approach of https://github.com/boblauer/mock-require