The information about a module that was loaded and matched a {@link ModuleWatcher} filter.
The globally used {@link ModuleWatcher} config.
Resets global state of {@link ModuleWatcher} as well as [Module._load]. Only call this when testing.
Adds a module load watcher for the desired configuration. By default only
userModules are watched.
The watcher will emit('match', loadedModuleInfo)
for each loaded module
that matches the filter.
the filter to use when matching loaded modules
Configures global behavior of the {@link ModuleWatcher} via the provided ModuleWatcherConfig.
the config with which the current one is replaced
Removes a watcher that has been added before via addWatcher.
Once removed it will no longer receive any module load 'match'
events.
the watcher to remove
Provides stats about added {@link ModuleWatcher}s.
Generated using TypeDoc
Specifies for which modules a
match
event should be emitted by the respective {@link ModuleWatcher}. One or more of the below properties can betrue
, but it is invalid if all arefalse
coreModules: if
true
matches are emitted for Node.js core modulesnodeModules: if
true
matches are emitted for modules loaded from thenode_modules
folderuserModules: if
true
matches are emitted for modules that are neither core nor node_modules, but found inside the user's project folder