MCPcopy
hub / github.com/webpack/webpack / hasReasons

Method hasReasons

lib/Module.js:921–926  ·  view source on GitHub ↗

* Checks whether this module contains the module graph. * @param {ModuleGraph} moduleGraph the module graph * @param {RuntimeSpec} runtime the runtime * @returns {boolean} true if at least one other module depends on this module

(moduleGraph, runtime)

Source from the content-addressed store, hash-verified

919 * @returns {boolean} true if at least one other module depends on this module
920 */
921 hasReasons(moduleGraph, runtime) {
922 for (const c of moduleGraph.getIncomingConnections(this)) {
923 if (c.isTargetActive(runtime)) return true;
924 }
925 return false;
926 }
927
928 /**
929 * Returns a string representation.

Callers 1

Calls 2

isTargetActiveMethod · 0.80

Tested by

no test coverage detected