webcheck-wait
v1.0.1
Published
A webcheck plugin to raise wait paramerter by delay
Downloads
2
Readme
webcheck-wait
A webcheck plugin to raise wait parameter by delay
How to install
npm install --save @atd/webcheck-wait
How to use
/*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();
Options
delay
: Number of milliseconds to elay.deviation
: Deviation of delay (random).filterUrl
: Follow only in 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;
}
}
}