MCPcopy Create free account
hub / github.com/TruthHun/BookStack / findDoc

Function findDoc

static/editor.md/lib/codemirror/addon/tern/tern.js:157–167  ·  view source on GitHub ↗
(ts, doc, name)

Source from the content-addressed store, hash-verified

155 }
156
157 function findDoc(ts, doc, name) {
158 for (var n in ts.docs) {
159 var cur = ts.docs[n];
160 if (cur.doc == doc) return cur;
161 }
162 if (!name) for (var i = 0;; ++i) {
163 n = "[doc" + (i || "") + "]";
164 if (!ts.docs[n]) { name = n; break; }
165 }
166 return ts.addDoc(name, doc);
167 }
168
169 function resolveDoc(ts, id) {
170 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