Installation
npm install intercept-require
About
Intercept, prevent, modify, and short-circuit calls to require()
.
Example
const intercept = ;// in this example, just transparently log every requireconst restore = ;// config has only one option `shortCircuit: boolean`// if short-circuit is active, `moduleExport` argument to listener will be null // require() calls now being intercepted;// require() calls no longer intercepted