webcheck-follow

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;
       }
   }
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    0
    • latest

Version History

Package Sidebar

Install

npm i webcheck-follow

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

42.5 kB

Total Files

17

Last publish

Collaborators

  • atd