flooding
make a function to execute like flooding, suitable for ticket-snatching tasks.
适用于执行抢票任务
Installation
npm i flooding -S
Usage
; floodingrun, ;
API
flooding(run: Function, options: {
fireAt: string; // 票券发售时刻
frames: number[]; // 倒计时刻开始执行任务,尾部执行频率加快
expiry?: number; // 超过 fireAt 多久停止任务,默认 60s
}):void
Todo
- xxxx
License
MIT