(items, id)
| 208 | } |
| 209 | |
| 210 | function pathFor(items, id) { |
| 211 | var labels = [] |
| 212 | var current = item(items, id) |
| 213 | var guard = 0 |
| 214 | |
| 215 | while (current && current.id !== "root" && guard < 32) { |
| 216 | labels.unshift(current.label) |
| 217 | current = item(items, current.parent) |
| 218 | guard += 1 |
| 219 | } |
| 220 | |
| 221 | return labels.join(" › ") |
| 222 | } |
| 223 | |
| 224 | function parentPathFor(items, id) { |
| 225 | var entry = item(items, id) |
no test coverage detected