Express utility functionsExpress实用函数

The pillarjs GitHub organization contains a number of modules for utility functions that may be generally useful.pillarjs GitHub组织包含许多实用功能模块,这些模块通常很有用。

Utility modules实用模块 Description描述
cookies Get and set HTTP(S) cookies that can be signed to prevent tampering, using Keygrip. 使用Keygrip获取并设置可以签名以防止篡改的HTTP(S)cookie。Can be used with the Node.js HTTP library or as Express middleware.可以与Node.js HTTP库一起使用,也可以作为Express中间件使用。
csrf Contains the logic behind CSRF token creation and verification. 包含CSRF令牌创建和验证背后的逻辑。Use this module to create custom CSRF middleware.使用此模块创建自定义CSRF中间件。
finalhandler Function to invoke as the final step to respond to HTTP request.函数调用,作为响应HTTP请求的最后一步。
parseurl Parse a URL with caching.使用缓存解析URL。
path-match Thin wrapper around path-to-regexp to make extracting parameter names easier.path-to-regexp进行精简包装,使提取参数名更容易。
path-to-regexp Turn an Express-style path string such as /user/:name into a regular expression.将Express样式的路径字符串(如/user/:name)转换为正则表达式。
resolve-path Resolves a relative path against a root path with validation.使用验证根据根路径解析相对路径。
router Simple middleware-style router.简单的中间件式路由器。
routington Trie-based URL router for defining and matching URLs.基于Trie的URL路由器,用于定义和匹配URL。
send Library for streaming files as a HTTP response, with support for partial responses (ranges), conditional-GET negotiation, and granular events.作为HTTP响应的流文件库,支持部分响应(范围)、条件GET协商和粒度事件。
templation View system similar to res.render() inspired by co-views and consolidate.js.视图系统类似于res.render(),灵感来源于co-viewsconsolidate.js

For additional low-level HTTP-related modules, see jshttp .有关其他与HTTP相关的低级模块,请参阅jshttp