MCPcopy Create free account
hub / github.com/FirefoxCSS-Store/FirefoxCSS-Store.github.io / repositoryLabel

Function repositoryLabel

src/lib/themes.ts:31–35  ·  view source on GitHub ↗
(repository: string)

Source from the content-addressed store, hash-verified

29}
30
31export function repositoryLabel(repository: string) {
32 const url = new URL(repository)
33 const path = url.pathname.replace(/^\/|\/$/g, '')
34 return `${url.hostname.replace(/^www\./, '')}/${path}`
35}
36
37export function withBasePath(path: string) {
38 if (/^https?:\/\//.test(path)) return path

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected