摘要: 将nodejs里的类似fs.readFile('1.text',(err,data)=>{...})的回调方法变为promise的方式,如下 const newReadFile = promisify(fs.readFile); newReadFile('1.txt') .then(data => 阅读全文
posted @ 2021-06-07 00:00 方小川 阅读(245) 评论(0) 推荐(0) 编辑