MCPcopy
hub / github.com/ampproject/amphtml / get

Method get

build-system/common/transform-cache.js:34–48  ·  view source on GitHub ↗

* @param {string} hash * @return {null|Promise }

(hash)

Source from the content-addressed store, hash-verified

32 * @return {null|Promise<T>}
33 */
34 get(hash) {
35 const cached = this.transformMap.get(hash);
36 if (cached) {
37 return cached;
38 }
39
40 const filename = this.key_(hash);
41 if (this.fsCache.has(filename)) {
42 const persisted = fs.readJson(path.join(this.cacheDir, filename));
43 this.transformMap.set(hash, persisted);
44 return persisted;
45 }
46
47 return null;
48 }
49
50 /**
51 * @param {string} hash

Callers 15

setStructFunction · 0.45
fixFunction · 0.45
ImportDeclarationFunction · 0.45
ImportNamespaceSpecifierFunction · 0.45
[memberSelector]Function · 0.45
[destructureSelector]Function · 0.45
ImportDeclarationFunction · 0.45
CallExpressionFunction · 0.45
eliminateFunction · 0.45
CallExpressionFunction · 0.45
resolveImportedEnumFunction · 0.45
ProgramFunction · 0.45

Calls 3

key_Method · 0.95
hasMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected