MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / findDoc

Function findDoc

lib/web/CodeMirror/addon/tern/tern.js:160–170  ·  view source on GitHub ↗
(ts, doc, name)

Source from the content-addressed store, hash-verified

158 }
159
160 function findDoc(ts, doc, name) {
161 for (var n in ts.docs) {
162 var cur = ts.docs[n];
163 if (cur.doc == doc) return cur;
164 }
165 if (!name) for (var i = 0;; ++i) {
166 n = "[doc" + (i || "") + "]";
167 if (!ts.docs[n]) { name = n; break; }
168 }
169 return ts.addDoc(name, doc);
170 }
171
172 function resolveDoc(ts, id) {
173 if (typeof id == "string") return ts.docs[id];

Callers 6

tern.jsFile · 0.85
resolveDocFunction · 0.85
trackChangeFunction · 0.85
innerFunction · 0.85
jumpBackFunction · 0.85
selectNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected