MCPcopy Create free account
hub / github.com/pacexy/flow / getNavPath

Method getNavPath

apps/reader/src/models/reader.ts:269–286  ·  view source on GitHub ↗
(navItem = this.currentNavItem)

Source from the content-addressed store, hash-verified

267 }
268
269 getNavPath(navItem = this.currentNavItem) {
270 const path: INavItem[] = []
271
272 if (this.nav) {
273 while (navItem) {
274 path.unshift(navItem)
275 const parentId = navItem.parent
276 if (!parentId) {
277 navItem = undefined
278 } else {
279 const index = this.nav.tocById[parentId]!
280 navItem = this.nav.getByIndex(parentId, index, this.nav.toc)
281 }
282 }
283 }
284
285 return path
286 }
287
288 searchInSection(keyword = this.keyword, section = this.section) {
289 if (!section) return

Callers 2

searchInSectionMethod · 0.95
ReaderPaneHeaderFunction · 0.80

Calls 1

getByIndexMethod · 0.80

Tested by

no test coverage detected