MCPcopy
hub / github.com/nwutils/nw-sample-apps / indexOf

Function indexOf

mini-code-edit/cm/lib/codemirror.js:3020–3025  ·  view source on GitHub ↗
(collection, elt)

Source from the content-addressed store, hash-verified

3018 }
3019
3020 function indexOf(collection, elt) {
3021 if (collection.indexOf) return collection.indexOf(elt);
3022 for (var i = 0, e = collection.length; i < e; ++i)
3023 if (collection[i] == elt) return i;
3024 return -1;
3025 }
3026 function isWordChar(ch) {
3027 return /\w/.test(ch) || ch.toUpperCase() != ch.toLowerCase();
3028 }

Callers 3

onMouseDownFunction · 0.70
codemirror.jsFile · 0.70
lineNoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected