MCPcopy
hub / github.com/webpack/webpack / getReadOnlyExportInfoRecursive

Method getReadOnlyExportInfoRecursive

lib/ExportsInfo.js:367–377  ·  view source on GitHub ↗

* Gets read only export info recursive. * @param {ExportInfoName[]} name export name * @returns {ExportInfo | undefined} export info for this name

(name)

Source from the content-addressed store, hash-verified

365 * @returns {ExportInfo | undefined} export info for this name
366 */
367 getReadOnlyExportInfoRecursive(name) {
368 /** @type {ExportsInfo} */
369 let exportsInfo = this;
370 const last = name.length - 1;
371 for (let i = 0; ; i++) {
372 const exportInfo = exportsInfo.getReadOnlyExportInfo(name[i]);
373 if (i === last) return exportInfo;
374 if (!exportInfo.exportsInfo) return;
375 exportsInfo = exportInfo.exportsInfo;
376 }
377 }
378
379 /**
380 * Gets nested exports info.

Callers 3

getTerminalBindingMethod · 0.80
handlerMethod · 0.80
getPropertyFunction · 0.80

Calls 1

getReadOnlyExportInfoMethod · 0.45

Tested by

no test coverage detected