libraryHref
A library's page, or one version's (and a tab of it).
import type { Trusted } from "#codebase/tcmts/cli/attest"; import { at } from "#codebase/tcmts/share"; export const libraryHref = (w: Trusted, pkg: string, version?: string, tab?: string): string => at( `/@${w.handle ?? w.did}/${encodeURIComponent(pkg)}${version ? `/${encodeURIComponent(version)}` : ""}${tab ? `?tab=${tab}` : ""}`, )