MCPcopy
hub / github.com/webpack/webpack / needCalls

Function needCalls

lib/Cache.js:49–57  ·  view source on GitHub ↗
(times, callback)

Source from the content-addressed store, hash-verified

47 * @returns {(err?: Error | null) => void} callback
48 */
49const needCalls = (times, callback) => (err) => {
50 if (--times === 0) {
51 return callback(err);
52 }
53 if (err && times > 0) {
54 times = 0;
55 return callback(err);
56 }
57};
58
59/**
60 * Abstract cache interface backed by tapable hooks for reading, writing, idle

Callers 1

getMethod · 0.70

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected