Learn how companies like Phone2Action are using npm in their front-end developmentJoin the conversation »

webcheck-wait

1.0.1 • Public • Published

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

Install

npm i webcheck-wait

DownloadsWeekly Downloads

3

Version

1.0.1

License

ISC

Unpacked Size

20 kB

Total Files

15

Last publish

Collaborators

  • avatar