使用bluebird解决promise兼容性问题

//引入promise
if(!Promise){
var Promise = require("bluebird");
// Configure
Promise.config({
longStackTraces: true,
warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
})
}

posted on 2017-11-23 15:23  杨龙飞  阅读(2202)  评论(3编辑  收藏  举报

导航

Fork me on GitHub