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

后端 未结 3 746
[愿得一人]
[愿得一人] 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 07:46

    Use:

    .nodeify(done, {spread: true});
    

    This allows multiple arguments to be passed to the 'done' callback.

    More info on:

    Bluebird nodeify documentation

提交回复
热议问题