library_helpers.ts

Declarations
#

13 declarations

view source

github_owner_parse
#

library_helpers.ts view source

(repo_url: string): string | null

Parse GitHub owner/org name from repository URL.

repo_url

type string

returns

string | null

package_is_published
#

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

type { [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; }

returns

boolean

repo_name_parse
#

repo_url_parse
#

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.

repository

type string | { [x: string]: unknown; type: string; url: string; directory?: string | undefined; } | undefined

returns

string | null

url_api_declaration
#

library_helpers.ts view source

(declaration_name: string): string

Build project-relative API documentation URL with hash anchor.

declaration_name

type string

returns

string

url_api_declaration_full
#

library_helpers.ts view source

(homepage: string, declaration_name: string): string

Build full API documentation URL with domain and hash anchor.

homepage

type string

declaration_name

type string

returns

string

url_api_module
#

library_helpers.ts view source

(module_path: string): string

Build project-relative module documentation URL.

module_path

type string

returns

string

url_github_file
#

library_helpers.ts view source

(repo_url: string, file_path: string, line?: number | undefined): string

Build GitHub file URL for a repository.

repo_url

type string

file_path

type string

line?

type number | undefined
optional

returns

string

url_github_org
#

library_helpers.ts view source

(repo_url: string, repo_name: string): string | null

Build GitHub organization URL from repo URL and repo name.

repo_url

type string

repo_name

type string

returns

string | null

url_npm_package
#

url_package_logo
#

url_to_root_relative
#

library_helpers.ts view source

(url: string, origin?: string): string

Convert a full URL to root-relative format by removing the origin.

url

type string

origin

type string
default page.url.origin

returns

string

url_well_known
#

library_helpers.ts view source

(homepage_url: string, filename: string): string

Build .well-known URL for package metadata files.

homepage_url

type string

filename

type string

returns

string

Depends on
#

Imported by
#