MCPcopy Create free account
hub / github.com/basecamp/omarchy / pathFor

Function pathFor

shell/plugins/menu/MenuModel.js:210–222  ·  view source on GitHub ↗
(items, id)

Source from the content-addressed store, hash-verified

208}
209
210function 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
224function parentPathFor(items, id) {
225 var entry = item(items, id)

Callers 2

parentPathForFunction · 0.85
displayRowFunction · 0.85

Calls 1

itemFunction · 0.85

Tested by

no test coverage detected