如果我有这样的事情如何构建一个返回一个常量字符串的蓝鸟承诺?
return this.retrieveArticles(blogId).then(function(response){
return response.articles;
}).then(_).call("findWhere", match).then(function(article){
return {
"article": article
}
});
,我决定要砍上咬下
return response.articles;
}).then(_).call("findWhere", match).then(function(article){
return {
"article": article
}
});
我怎么做这样的事情
Promise.return(articles).then(_).call("findWhere", match).then(function(article){
return {
"article": article
}
});
你的意思'Promise.resolve(_(文章).findWhere(比赛))'? – Bergi 2014-12-19 13:04:24