0

我最近注意到nextexpressjs响应对象上有一个未记录的函数。

该功能与中间件next中的功能相同吗? function(req, res, next)

是否不鼓励使用它,因为它没有记录?

4

1 回答 1

0

Yes, it is the same function as can be seen here in the source code.

Yes, I would say it's use is discouraged because it is undocumented and also unnecessary since each middleware function will get next passed in as the 3rd argument.

于 2013-07-15T17:39:40.480 回答