(items, id)
| 222 | } |
| 223 | |
| 224 | function parentPathFor(items, id) { |
| 225 | var entry = item(items, id) |
| 226 | if (!entry || !entry.parent || entry.parent === "root") return "" |
| 227 | return pathFor(items, entry.parent) |
| 228 | } |
| 229 | |
| 230 | function isDescendantOf(items, id, ancestorId) { |
| 231 | if (ancestorId === "root") return id !== "root" |