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

Method READ_PACKAGE_JSON

tools/mcpack.js:969–980  ·  view source on GitHub ↗
(packageURL)

Source from the content-addressed store, hash-verified

967 return null;
968 }
969 READ_PACKAGE_JSON(packageURL) {
970 let pjson = this.packages.get(packageURL);
971 if (pjson !== undefined)
972 return pjson;
973 let path = this.urlToFilePath(packageURL + "/package.json");
974 if (path)
975 pjson = this.readFileJSON(path);
976 else
977 pjson = null;
978 this.packages.set(packageURL, pjson);
979 return pjson;
980 }
981
982// BUILT-INS
983

Callers 6

parseModuleMethod · 0.80
runMethod · 0.80
PACKAGE_RESOLVEMethod · 0.80
PACKAGE_SELF_RESOLVEMethod · 0.80
ESM_FILE_FORMATMethod · 0.80

Calls 4

urlToFilePathMethod · 0.80
readFileJSONMethod · 0.80
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected