我最近注意到expressjs response对象上有一个未公开的next
函数。
该函数与middleware function(req, res, next)
中的next
相同吗?
是不是因为它没有文档而不鼓励使用它?
发布于 2013-07-16 01:39:40
是的,it is the same function as can be seen here in the source code。
是的,我会说不鼓励使用它,因为它没有文档记录,而且也没有必要,因为每个中间件函数都会将next
作为第三个参数传入。
https://stackoverflow.com/questions/17659140
复制相似问题