@contrast/dep-hooks
Register hooks for module loads.
This provides a factory wrapper around @contrast/require-hook
.
RequireHook class exposes the following methods:
resolve(descriptor, ...handlers)
- Registers handlers to run after the described
module is required.
- descriptor:String - descriptor that describes the module to hook
- handlers:Function - functions that are executed after the require
reset(request)
- Resets the seen handlers for a given module - they will be re-run
on next require.
- request:String - request the string passed to require()
https://github.com/Contrast-Security-Inc/node-require-hook