method BrokenLinkChecker.prototype.check
BrokenLinkChecker.prototype.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).

Examples

Example 1

const { successes } = await BrokenLinkChecker.create()
  .check(["https://example.com", "https://example.com/sitemap.xml"])
  .partition();

Parameters

startUrls: (string | URL)[]

Return Type

Stream<CheckResult, Error>

Usage

import { BrokenLinkChecker } from ".";