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

Function flush

test/html5lib.spectest.js:145–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143 const byId = new Map();
144 let pending = [];
145 const flush = async () => {
146 const inputs = [];
147 for (const c of pending) inputs.push(c.input);
148 const internalByEntry = await buildBatch(inputs, mode);
149 for (const [k, c] of pending.entries()) {
150 byId.set(c.id, internalByEntry.get(k) || []);
151 }
152 pending = [];
153 };
154 for (const c of tokenizerCases) {
155 pending.push(c);
156 if (pending.length === BATCH) await flush();

Callers 3

allocateMethod · 0.50
_serializeMethod · 0.50

Calls 5

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

Tested by

no test coverage detected