使用bluebird解决promise兼容性问题

2018-06-15 16:59:53 浏览数 (1)

代码语言:javascript复制
//引入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
    })
  }

0 人点赞