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

Function buildDocSlug

docs/app/utils/path-builders.ts:4–15  ·  view source on GitHub ↗
({
	section,
	subsection,
	filename,
}: {
	section?: string
	subsection?: string
	filename: string
})

Source from the content-addressed store, hash-verified

2import { splitSlug } from "./split-slug"
3
4export function buildDocSlug({
5 section,
6 subsection,
7 filename,
8}: {
9 section?: string
10 subsection?: string
11 filename: string
12}) {
13 const seg = [section, subsection, filename].map((s) => (s ?? "").trim()).filter(Boolean)
14 return seg.join("/")
15}
16
17export function buildDocPathFromSlug(slug: string) {
18 const parts = slug.split("/").filter(Boolean)

Callers 1

loaderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…