expressjs middleware next function vs response objects next function

时间:2013-07-15 16:30:03

标签: node.js express

我最近在expressjs response对象上发现了一个未记录的next函数。

该功能是否与middleware next中的function(req, res, next)相同?

它的使用是否被禁止,因为它没有记录?

1 个答案:

答案 0 :(得分:0)

是的,it is the same function as can be seen here in the source code

是的,我会说它的使用是不受欢迎的,因为它没有文档也没有必要,因为每个中间件函数都将next作为第3个参数传入。

相关问题