A webcheck plugin to raise wait parameter by delay
npm install --save @atd/webcheck-wait
/*jslint node:true*/
'use strict';
var WaitPlugin = require('@atd/webcheck-wait');
var Webcheck = require('webcheck');
var webcheck = new Webcheck();
var plugin = new WaitPlugin({
delay: 10000,
deviation: 5000
});
webcheck.addPlugin(plugin);
plugin.enable();
delay
: Number of milliseconds to elay.deviation
: Deviation of delay (random).filterUrl
: Follow only in matching url.
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;
}
}
}