MCPcopy
hub / github.com/webpack/webpack / isAvailableChunk

Function isAvailableChunk

lib/ChunkGraph.js:208–218  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

206 * @returns {boolean} true, if a is always a parent of b
207 */
208const isAvailableChunk = (a, b) => {
209 const queue = new Set(b.groupsIterable);
210 for (const chunkGroup of queue) {
211 if (a.isInGroup(chunkGroup)) continue;
212 if (chunkGroup.isInitial()) return false;
213 for (const parent of chunkGroup.parentsIterable) {
214 queue.add(parent);
215 }
216 }
217 return true;
218};
219
220/** @typedef {SortableSet<Chunk>} SortableChunks */
221/** @typedef {Set<Chunk>} EntryInChunks */

Callers 1

canChunksBeIntegratedMethod · 0.85

Calls 3

isInGroupMethod · 0.80
isInitialMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected