library_helpers.ts view source
(repo_url: string): string | null Parse GitHub owner/org name from repository URL.
repo_url
stringreturns
string | null 13 declarations
library_helpers.ts view source
(repo_url: string): string | null Parse GitHub owner/org name from repository URL.
repo_urlstringstring | null library_helpers.ts view source
(package_json: { [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }): boolean Check if a package is published to npm.
package_json{ [x: string]: unknown; name: string; version: string; private?: boolean | undefined; public?: boolean | undefined; description?: string | undefined; motto?: string | undefined; glyph?: string | undefined; ... 24 more ...; exports?: string | ... 2 more ... | undefined; }boolean library_helpers.ts view source
(name: string): string Extract repository name without scope from package name.
namestringstring library_helpers.ts view source
(repository: string | { [x: string]: unknown; type: string; url: string; directory?: string | undefined; } | undefined): string | null Parse repository URL from package.json format.
repositorystring | { [x: string]: unknown; type: string; url: string; directory?: string | undefined; } | undefinedstring | null library_helpers.ts view source
(declaration_name: string): string Build project-relative API documentation URL with hash anchor.
declaration_namestringstring library_helpers.ts view source
(homepage: string, declaration_name: string): string Build full API documentation URL with domain and hash anchor.
homepagestringdeclaration_namestringstring library_helpers.ts view source
(module_path: string): string Build project-relative module documentation URL.
module_pathstringstring library_helpers.ts view source
(repo_url: string, file_path: string, line?: number | undefined): string Build GitHub file URL for a repository.
repo_urlstringfile_pathstringline?number | undefinedstring library_helpers.ts view source
(repo_url: string, repo_name: string): string | null Build GitHub organization URL from repo URL and repo name.
repo_urlstringrepo_namestringstring | null library_helpers.ts view source
(package_name: string): string Build npm package URL.
package_namestringstring library_helpers.ts view source
(homepage_url: string | null, logo_path?: string | undefined): string | null Build package logo URL with favicon.png fallback.
homepage_urlstring | nulllogo_path?string | undefinedstring | null library_helpers.ts view source
(url: string, origin?: string): string Convert a full URL to root-relative format by removing the origin.
urlstringoriginstringpage.url.originstring library_helpers.ts view source
(homepage_url: string, filename: string): string Build .well-known URL for package metadata files.
homepage_urlstringfilenamestringstring