dead-link

1.0.0 • Public • Published

Dead Link Travis Build

A package for checking web pages for dead links.

Usage

  1. Install. npm install dead-link --save

  2. Use it.

var deadLink = require("dead-link");
 
deadLink.check('https://google.com', {
    failure: function(uri){
        console.log("You have a dead link");
    }
});

Definition

  • .check(link, callbacks)
    • Gets all hrefs at the link page, and visits them really quickly.
    • callbacks is an optional value containing functions that are triggered throughout the proccess
    • callbacks.succsss(uri) is called whenever the uri is successfully visited
    • callbacks.failure(uri) is called whenever the uri is broken
    • callbacks.finished(links) is called whenever links are retrieved from the initial page.

Check out example.js to see usage.

Why

I see too many sites with links that are broken. Use this to make something that checks your site automagically. Please.

No more dead links.

/dead-link/

    Package Sidebar

    Install

    npm i dead-link

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • ghmeier