UNPKG

jimi_ccap

Version:

node.js generate captcha using c++ library CImg without install any other lib or software

28 lines (23 loc) 396 B
/* 验证码定时生成器器 */ var timer = { timeout:1000*60*24,//更新验证码时间1分钟 reg_ary:[], timer:function(){ var rary = this.reg_ary, len = rary.length; for(var i=0;i<len;i++){ rary[i]._timer(); } this.loop(); }, loop:function(){ var that = this; setTimeout(function(){ that.timer(); },that.timeout) } } //timer.loop(); module.exports = timer;