MCPcopy Index your code
hub / github.com/TGX-Android/Publisher / getObject

Function getObject

main.js:291–307  ·  view source on GitHub ↗
(type, id)

Source from the content-addressed store, hash-verified

289}
290
291async function getObject (type, id) {
292 if (!cur.cache[type]) {
293 cur.cache[type] = {};
294 }
295 const cached = cur.cache[type][id];
296 if (cached !== undefined) {
297 return cached;
298 }
299 try {
300 const value = await db.get(type + '_' + id, {valueEncoding: 'json'});
301 cur.cache[type][id] = value;
302 return value;
303 } catch (err) {
304 cur.cache[type][id] = null;
305 return null;
306 }
307}
308
309function checksum (path, callback, algorithm) {
310 const stream = fs.createReadStream(path);

Callers 8

storeObjectFunction · 0.85
traceMaxApkVersionCodeFunction · 0.85
canUploadApkFunction · 0.85
traceDurationFunction · 0.85
estimateBuildDurationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected