warner
A warner for watch anything you want. If meet the required criterion, it will trigger an event
Installation
$ npm install warner
API
const Warner = ;const loginFailWarner = time: '00:00-01:00' max: 10 time: '01:00-03:00' max: 20 time: '03:00-07:00' max: 30 time: '07:00-21:00' max: 60 time: '21:00-24:00' max: 40 60 * 1000;// every 30s to check whether meet the required criterionloginFailWarnerinterval = 30 * 1000;loginFailWarner;// simulate every 3s, there is an user login fail;
License
MIT