MCPcopy
hub / github.com/webpack/webpack / resolveLazy

Function resolveLazy

test/BinaryMiddleware.unittest.js:27–34  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

25 * @returns {unknown} resolved item
26 */
27const resolveLazy = (item) => {
28 if (SerializerMiddleware.isLazy(item)) {
29 const data = item();
30 if (Array.isArray(data)) return { resolvesTo: data.map(resolveLazy) };
31 return { resolvesTo: resolveLazy(data) };
32 }
33 return item;
34};
35
36describe("BinaryMiddleware", () => {
37 const items = [

Callers

nothing calls this directly

Calls 2

isArrayMethod · 0.80
isLazyMethod · 0.45

Tested by

no test coverage detected