(obj, path)
| 175 | } |
| 176 | |
| 177 | function treeIndexGet(obj, path) { |
| 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 | |
| 195 | function treeIndexSet(obj, path, value) { |
| 196 | if (typeof path === "string") { |
no test coverage detected