default: {
    getURLsByTag(
        inputURLs?: string[],
        options?: GetUrlsByTagOptions,
    ): Record<string, TaggedUrl[]>;
    normalize(inputURL: string): string;
    prettify(inputURL: string): string;
    validate(inputURL: string): boolean;
} = ...

Legacy helper collection for URL normalization and presentation.

Type declaration

  • getURLsByTag:function
  • normalize:function
    • Applies known normalization rules to the URL. Since the URL is parsed via url.parse, special characters are also urlencoded.

      Parameters

      • inputURL: string

      Returns string

  • prettify:function
    • Produces a compact representation of the URL, removing protocol and trailing slash noise for display purposes.

      Parameters

      • inputURL: string

      Returns string

  • validate:function
    • Validates that the supplied string resembles an HTTP(S) or FTP URL.

      Parameters

      • inputURL: string

      Returns boolean