MCPcopy
hub / github.com/webpack/webpack / wrapFunctionWithFrame

Function wrapFunctionWithFrame

test/BenchmarkTestCases.benchmark.mjs:582–592  ·  view source on GitHub ↗
(fn, isAsync)

Source from the content-addressed store, hash-verified

580 * @returns {() => void} function wrapped in codspeed root frame
581 */
582 const wrapFunctionWithFrame = (fn, isAsync) => {
583 if (isAsync) {
584 return async function __codspeed_root_frame__() {
585 await fn();
586 };
587 }
588
589 return function __codspeed_root_frame__() {
590 fn();
591 };
592 };
593
594 /**
595 * @param {string} uri URI

Callers 2

runTaskAsyncFunction · 0.85
runTaskSyncFunction · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected