MCPcopy
hub / github.com/webpack/webpack / flush

Function flush

test/cssParsing-webpack.spectest.js:130–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128 const byId = new Map();
129 let pending = [];
130 const flush = async () => {
131 const inputs = [];
132 for (const c of pending) inputs.push(c.input);
133 const internalByEntry = await buildBatch(inputs, mode);
134 for (const [k, c] of pending.entries()) {
135 byId.set(c.id, internalByEntry.get(k) || []);
136 }
137 pending = [];
138 };
139 for (const c of cases) {
140 pending.push(c);
141 if (pending.length === BATCH) await flush();

Callers 1

Calls 5

entriesMethod · 0.80
buildBatchFunction · 0.70
pushMethod · 0.45
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected