MCPcopy
hub / github.com/ternjs/tern / fetchAll

Function fetchAll

lib/tern.js:331–349  ·  view source on GitHub ↗
(srv, c)

Source from the content-addressed store, hash-verified

329 }
330
331 function fetchAll(srv, c) {
332 var done = true, returned = false;
333 srv.files.forEach(function(file) {
334 if (file.text != null) return;
335 if (srv.options.async) {
336 done = false;
337 srv.options.getFile(file.name, function(err, text) {
338 if (err && !returned) { returned = true; return c(err); }
339 updateText(file, text || "", srv);
340 fetchAll(srv, c);
341 });
342 } else {
343 try {
344 updateText(file, srv.options.getFile(file.name) || "", srv);
345 } catch (e) { return c(e); }
346 }
347 });
348 if (done) c();
349 }
350
351 function waitOnFetch(srv, timeBudget, c) {
352 var done = function() {

Callers

nothing calls this directly

Calls 2

cFunction · 0.85
updateTextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…