Doc lints
This commit is contained in:
parent
339ae06992
commit
a4aeefa53c
1 changed files with 6 additions and 5 deletions
|
@ -10,7 +10,8 @@ import {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Verifiers are regexes which will match valid
|
* Verifiers are regexes which will match valid
|
||||||
* identifiers to their type
|
* identifiers to their type. (This is a lie, they
|
||||||
|
* can return anything)
|
||||||
*/
|
*/
|
||||||
type Verifier<A> = [RegExp, A];
|
type Verifier<A> = [RegExp, A];
|
||||||
export const roomVerifiers: Verifier<
|
export const roomVerifiers: Verifier<
|
||||||
|
@ -91,7 +92,7 @@ export function parsePermalink(identifier: string) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* descriminate applies the verifiers to the identifier and
|
* descriminate applies the verifiers to the identifier and
|
||||||
* returns it's type
|
* returns the identifier's type
|
||||||
*/
|
*/
|
||||||
export function discriminate<T, F>(
|
export function discriminate<T, F>(
|
||||||
identifier: string,
|
identifier: string,
|
||||||
|
@ -143,9 +144,9 @@ export function parseArgs(args: string): Arguments {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* toURI converts a parsed link to uri. Typically it's recommended
|
* toURI converts a Link to uri. It's recommended
|
||||||
* to show the original link if it existed but this is handy in the
|
* to use the original link instead of toURI if it existed.
|
||||||
* case where this was constructed.
|
* This is handy function in case the Link was constructed.
|
||||||
*/
|
*/
|
||||||
export function toURI(hostname: string, link: SafeLink): string {
|
export function toURI(hostname: string, link: SafeLink): string {
|
||||||
const cleanHostname = hostname.trim().replace(/\/+$/, "");
|
const cleanHostname = hostname.trim().replace(/\/+$/, "");
|
||||||
|
|
Loading…
Reference in a new issue