MCPcopy
hub / github.com/webpack/tapable / register

Function register

benchmark/cases/async-parallel-hook/index.bench.mjs:46–61  ·  view source on GitHub ↗
(bench)

Source from the content-addressed store, hash-verified

44 * @param {import('tinybench').Bench} bench
45 */
46export default function register(bench) {
47 for (const n of [1, 5, 20]) {
48 const hook = makeHook(n, "sync");
49 bench.add(`async-parallel-hook: ${n} sync taps`, () => runBatch(hook));
50 }
51
52 for (const n of [5, 20]) {
53 const hook = makeHook(n, "async");
54 bench.add(`async-parallel-hook: ${n} async taps`, () => runBatch(hook));
55 }
56
57 {
58 const hook = makeHook(5, "promise");
59 bench.add("async-parallel-hook: 5 promise taps", () => runBatch(hook));
60 }
61}

Callers

nothing calls this directly

Calls 2

makeHookFunction · 0.70
runBatchFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…