Express utility functions快捷实用功能
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. Can be used with the Node.js HTTP library or as Express middleware.使用Keygrip获取和设置可以签名以防止篡改的HTTP(S)Cookie。可以与Node.js HTTP库一起使用,也可以作为Express中间件使用。 |
csrf |
Contains the logic behind CSRF token creation and verification. Use this module to create custom CSRF middleware.包含CSRF令牌创建和验证背后的逻辑。使用此模块创建自定义CSRF中间件。 |
finalhandler |
Function to invoke as the final step to respond to HTTP request.作为响应HTTP请求的最后一步调用的函数。 |
parseurl |
Parse a URL with caching.使用缓存解析URL。 |
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.简单的中间件式路由器。 |
send |
Library for streaming files as a HTTP response, with support for partial responses (ranges), conditional-GET negotiation, and granular events.用于将文件作为HTTP响应流式传输的库,支持部分响应(范围)、条件GET协商和粒度事件。 |
For additional low-level HTTP-related modules, see jshttp.有关其他低级HTTP相关模块,请参阅jshttp。