MCPcopy
hub / github.com/webpack/webpack / getNestedExportsInfo

Method getNestedExportsInfo

lib/ExportsInfo.js:384–396  ·  view source on GitHub ↗

* Gets nested exports info. * @param {ExportInfoName[]=} name the export name * @returns {ExportsInfo | undefined} the nested exports info

(name)

Source from the content-addressed store, hash-verified

382 * @returns {ExportsInfo | undefined} the nested exports info
383 */
384 getNestedExportsInfo(name) {
385 if (Array.isArray(name) && name.length > 0) {
386 /** @type {ExportsInfo} */
387 let exportsInfo = this;
388 for (let i = 0; i < name.length; i++) {
389 const info = exportsInfo.getReadOnlyExportInfo(name[i]);
390 if (!info.exportsInfo) return;
391 exportsInfo = info.exportsInfo;
392 }
393 return exportsInfo;
394 }
395 return this;
396 }
397
398 /**
399 * Sets unknown exports provided.

Callers

nothing calls this directly

Calls 2

isArrayMethod · 0.80
getReadOnlyExportInfoMethod · 0.45

Tested by

no test coverage detected