MCPcopy Create free account
hub / github.com/culvertsoft/mgen / recTreeIndexGet

Function recTreeIndexGet

mgen-javascriptlib/src/main/javascript/mgen-lib.js:180–191  ·  view source on GitHub ↗
(obj, path)

Source from the content-addressed store, hash-verified

178 var original_path = path;
179
180 function recTreeIndexGet(obj, path) {
181 if (typeof path === "string") {
182 return recTreeIndexGet(obj, path.split("."));
183 } else if (path.length === 0 || obj[path[0]] === undefined) {
184 if (typeof obj !== "function") {
185 throw Error("Class " + original_path + " not found in ClassRegistryBlueprint.");
186 }
187 return obj;
188 } else {
189 return recTreeIndexGet(obj[path[0]], path.slice(1));
190 }
191 }
192 return recTreeIndexGet(obj, path);
193 }
194

Callers 1

treeIndexGetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected