How to pass a third argument to a callback using Bluebird.js nodeify

后端 未结 3 778
[愿得一人]
[愿得一人] 2021-01-14 07:38

With a little help I\'ve arrived at the following code to promisify a passport.js login strategy.

var passport = require(\'passport\');
var LocalStrategy = r         


        
3条回答
  •  青春惊慌失措
    2021-01-14 08:02

    Currently, there is no way to do it with .nodeify, you can of course do it manually with .then:

    .then(function(result){
         done(/*whatever arguments you need*/);
    },function(failure){
         done(/* failure argumnets */);
    });
    

提交回复
热议问题