MCPcopy Index your code
hub / github.com/htmlhint/HTMLHint / hintUrl

Function hintUrl

src/cli/htmlhint.ts:527–543  ·  view source on GitHub ↗
(
  url: string,
  ruleset: Ruleset | undefined,
  callback: (messages: Hint[]) => void
)

Source from the content-addressed store, hash-verified

525
526// hint url
527function hintUrl(
528 url: string,
529 ruleset: Ruleset | undefined,
530 callback: (messages: Hint[]) => void
531) {
532 const errorFn = () => callback([])
533 fetch(url).then((response) => {
534 if (response.ok) {
535 response.text().then((body) => {
536 const messages = HTMLHint.verify(body, ruleset)
537 callback(messages)
538 }, errorFn)
539 } else {
540 errorFn()
541 }
542 }, errorFn)
543}

Callers 1

hintAllFilesFunction · 0.85

Calls 2

errorFnFunction · 0.85
verifyMethod · 0.80

Tested by

no test coverage detected