其實很簡單,它幫你把原本吃callback 的函數變成了Promise 風格的函數。 它的用法是這樣… ... fs.readFile('/etc/passwd', (err, data) => { if (err) throw err;
確定! 回上一頁