webcheck-follow
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

    webcheck-follow

    Webcheck plugin to follow resources from HTML and CSS resources

    How to install

    npm install --save webcheck-follow

    How to use

    var Webcheck = require('webcheck');
    var FollowPlugin = require('webcheck-follow');
     
    var plugin = FollowPlugin();
     
    var webcheck = new Webcheck();
    webcheck.addPlugin(plugin);
     
    plugin.enable();
     
    // now continue with your code...
     

    Options

    • filterContentType: Follow only in matching content-type.
    • filterStatusCode: Follow only in matching HTTP status code (defaults to 2xx status codes).
    • filterUrl: Follow only in matching url.
    • filterFollowUrl: Follow only matching url.

    Note for filters

    Filters are regular expressions, but the plugin uses only the .test(str) method to proof. You are able to write your own and much complexer functions by writing the logic in the test method of an object like this:

    opts = {
       filterSomething: {
           test: function (val) {
               return false || true;
           }
       }
    }

    Install

    npm i webcheck-follow

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    42.5 kB

    Total Files

    17

    Last publish

    Collaborators

    • avatar