MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / PACKAGE_SELF_RESOLVE

Method PACKAGE_SELF_RESOLVE

tools/mcpack.js:784–793  ·  view source on GitHub ↗
(packageName, packageSubpath, parentURL)

Source from the content-addressed store, hash-verified

782 this.throwModuleNotFoundError();
783 }
784 PACKAGE_SELF_RESOLVE(packageName, packageSubpath, parentURL) {
785 let packageURL = this.LOOKUP_PACKAGE_SCOPE(parentURL);
786 if (packageURL === null)
787 return undefined;
788 let pjson = this.READ_PACKAGE_JSON(packageURL);
789 if ((pjson === null) || (pjson.exports === null) || (pjson.exports === undefined))
790 return undefined;
791 if (pjson.name === packageName)
792 return this.PACKAGE_EXPORTS_RESOLVE(packageURL, packageSubpath, pjson.exports, defaultConditions);
793 }
794 PACKAGE_EXPORTS_RESOLVE(packageURL, subpath, exports, conditions) {
795 let dotKeys = 0;
796 let noDotKeys = 0;

Callers 1

PACKAGE_RESOLVEMethod · 0.80

Calls 3

LOOKUP_PACKAGE_SCOPEMethod · 0.80
READ_PACKAGE_JSONMethod · 0.80

Tested by

no test coverage detected