摘要:
先安装 bluebird npm install bluebird 使用promisifyAll函数,可以将模块导出的接口promise化,注意处理后的API函数名加Async如:fs.readFileAsync() var Promise = require('bluebird') const f 阅读全文
posted @ 2021-05-16 14:01
丁同亚的博客
阅读(79)
评论(0)
推荐(0)
摘要:
//此时是等价的 exports.name = 'xxx' module.exports.sex = '男' //此时把module.export指向的对象改变,以module.exports为准 module.exports = { id:'1', girlfriend:{ name:'yyy' 阅读全文
posted @ 2021-05-16 10:05
丁同亚的博客
阅读(131)
评论(0)
推荐(0)
浙公网安备 33010602011771号