MCPcopy Index your code
hub / github.com/nwutils/nw-sample-apps / lookup

Function lookup

mini-code-edit/cm/lib/codemirror.js:2095–2111  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

2093 }
2094 function lookupKey(name, extraMap, map, handle, stop) {
2095 function lookup(map) {
2096 map = getKeyMap(map);
2097 var found = map[name];
2098 if (found != null && handle(found)) return true;
2099 if (map.nofallthrough) {
2100 if (stop) stop();
2101 return true;
2102 }
2103 var fallthrough = map.fallthrough;
2104 if (fallthrough == null) return false;
2105 if (Object.prototype.toString.call(fallthrough) != "[object Array]")
2106 return lookup(fallthrough);
2107 for (var i = 0, e = fallthrough.length; i < e; ++i) {
2108 if (lookup(fallthrough[i])) return true;
2109 }
2110 return false;
2111 }
2112 if (extraMap && lookup(extraMap)) return true;
2113 return lookup(map);
2114 }

Callers 1

lookupKeyFunction · 0.85

Calls 2

getKeyMapFunction · 0.85
stopFunction · 0.85

Tested by

no test coverage detected