摘要: Node的Event Loop分阶段,阶段有先后,依次是 expired timers and intervals,即到期的setTimeout/setInterval I/O events,包含文件,网络等等 immediates,通过setImmediate注册的函数 close handler 阅读全文
posted @ 2019-11-06 15:07 王利群 阅读(112) 评论(0) 推荐(0) 编辑
摘要: http://blog.sina.com.cn/s/blog_77e8d1350100wfc7.html 阅读全文
posted @ 2019-10-10 10:58 王利群 阅读(93) 评论(0) 推荐(0) 编辑
摘要: express-async-errors express-validator bcryptjs helmet 阅读全文
posted @ 2019-10-09 10:58 王利群 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 涉及到buffer, 静态文件等,提前转化为buffer处理 阅读全文
posted @ 2019-10-08 15:13 王利群 阅读(233) 评论(0) 推荐(0) 编辑
摘要: arr.reduce((prev, args) => prev.then(() =>bar(arg)), Promise.resolve()); function f() { console.log(tmp); if (false) { var tmp = 'hello world'; } } le 阅读全文
posted @ 2019-07-23 17:01 王利群 阅读(176) 评论(0) 推荐(0) 编辑
摘要: const selectionSort = arr => { let len = arr.length, temp, min; for (let i = 0; i { let temp; for (let i = arr.length - 1; i > 0; i--) { for (let j = 1; j arr[j]) { ... 阅读全文
posted @ 2019-07-22 14:37 王利群 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Object.prototype.toString.call(array)判断类型 git rm -r --cached . git add . git commit -m 'update .gitignore' 阅读全文
posted @ 2019-07-22 13:58 王利群 阅读(191) 评论(0) 推荐(0) 编辑
摘要: request(url).pipe(fs.createWriteStream(`./spiderFiles/${name}.png`)); 阅读全文
posted @ 2019-05-08 16:30 王利群 阅读(624) 评论(0) 推荐(0) 编辑
摘要: cors-Request cors-Response 阅读全文
posted @ 2019-03-07 14:49 王利群 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 基础类型 布尔 let isDone: boolean = false; 数字 let decLiteral: number = 6; 字符串 let name: string = "bob"; 数组 let list: number[] = [1, 2, 3]; let list: ... 阅读全文
posted @ 2019-03-05 14:36 王利群 阅读(158) 评论(0) 推荐(0) 编辑