MCPcopy
hub / github.com/webpack/webpack / setPreOrderIndexIfUnset

Method setPreOrderIndexIfUnset

lib/ModuleGraph.js:826–833  ·  view source on GitHub ↗

* Sets pre order index if unset. * @param {Module} module the module * @param {number} index the index of the module * @returns {boolean} true, if the index was set

(module, index)

Source from the content-addressed store, hash-verified

824 * @returns {boolean} true, if the index was set
825 */
826 setPreOrderIndexIfUnset(module, index) {
827 const mgm = this._getModuleGraphModule(module);
828 if (mgm.preOrderIndex === null) {
829 mgm.preOrderIndex = index;
830 return true;
831 }
832 return false;
833 }
834
835 /**
836 * Sets post order index.

Callers 1

processQueueFunction · 0.80

Calls 1

_getModuleGraphModuleMethod · 0.95

Tested by

no test coverage detected