1.0.0 • Published 5 years ago

webcheck-follow v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

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

5 years ago

0.1.0

8 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago