MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / parentOf

Function parentOf

docs/app/utils/create-sidebar-tree.ts:17–20  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

15}
16
17const parentOf = (slug: string) => {
18 const i = slug.lastIndexOf("/")
19 return i === -1 ? "" : slug.slice(0, i)
20}
21
22export async function createSidebarTree(version: Version) {
23 const { allPages, allSections } = await getContent(version)

Callers 1

createSidebarTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…