UNPKG

@avenga/linkinator

Version:

Find broken links, missing images, etc in your HTML. Scurry around your site and find all those broken links.

30 lines (29 loc) 1.2 kB
import { type CrawlOptions } from './crawler.ts'; import type { CheckOptions, InternalCheckOptions } from './options.ts'; /** * Convenience method to perform a scan. * @param options CheckOptions to be passed on */ export declare function check(options: CheckOptions): Promise<import("./types.ts").CrawlResult>; /** * Checks to see if a given source is HTML. * @param {object} response Page response. * @returns {boolean} */ export declare function isHtml(response: Response): boolean; /** * Checks to see if a given source is CSS. * @param {object} response Page response. * @returns {boolean} */ export declare function isCSS(response: Response): boolean; /** * When running a local static web server for the user, translate paths from * the Url generated back to something closer to a local filesystem path. * @example * http://localhost:0000/test/route/README.md => test/route/README.md * @param url The url that was checked * @param options Original CheckOptions passed into the client */ export declare function mapUrl<T extends string | undefined>(url: T, options?: InternalCheckOptions): T; export declare function createFetchOptions(options: CrawlOptions): RequestInit;