0.2.1 • Published 6 years ago

check-deadlink v0.2.1

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

check-deadlink

Examine deadlinks in a pages

npm: check-deadlink CircleCI Coverage Status tested with jest code style: prettier license: mit TypeScript

Install

yarn add [-D] check-deadlink

Example

const checkDeadlink = require('check-deadlink');

(async () => {
  // options is options of the `padex` package
  const result = await checkDeadlink('https://example.com', options);
  // result === {
  //   'http://error.com': {
  //     document,
  //     from: [document, document, ...],
  //     /* In the above `from`,
  //      * Array of the Document of the `padex` package,
  //      * that has linked to this document
  //      */
  //   }
  // }
})()
  .catch(err => {
    console.error(err);
  });