A concurrent website crawler that finds broken links.
Creates a new BrokenLinkChecker with all defaults.
config: ResolvedConfig
check(startUrls: (string | URL)[]): Stream<CheckResult, Error>
Start crawling from one or more entrypoints. Returns a stream of CheckResult. Use partition() to separate ok/broken links (successes) from stream errors (errors).
filterUrls(fn: (url: URL) => boolean): BrokenLinkChecker
Returns a new BrokenLinkChecker that filters URLs before checking them.
keepBroken(fn: (result: CheckResult) => boolean): BrokenLinkChecker
Returns a new BrokenLinkChecker that keeps broken links matching the predicate in results.
withConcurrency(n: number): BrokenLinkChecker
Returns a new BrokenLinkChecker with the given concurrency limit.
withFetch(fetch: globalThis.fetch): BrokenLinkChecker
Returns a new BrokenLinkChecker using the given fetch function.
withLogLevel(level: LogLevel): BrokenLinkChecker
Returns a new BrokenLinkChecker with the given log level.
withRetry(retry: RetryOptions): BrokenLinkChecker
Returns a new BrokenLinkChecker with retry options merged into existing ones.
withTimeout(ms: number): BrokenLinkChecker
Returns a new BrokenLinkChecker with the given request timeout in milliseconds.
withUserAgent(ua: string): BrokenLinkChecker
Returns a new BrokenLinkChecker with the given User-Agent header.