querystring 查询字符串
稳定性: 2 - 稳定
源代码: lib/querystring.js
node:querystring
模块提供了用于解析和格式化网址查询字符串的实用工具。
可以使用以下方式访问它:
const querystring = require('node:querystring');
querystring
比 <URLSearchParams> 性能更高,但不是标准化的 API。
当性能不重要或需要与浏览器代码兼容时使用 <URLSearchParams>。
Stability: 2 - Stable
Source Code: lib/querystring.js
The node:querystring
module provides utilities for parsing and formatting URL
query strings. It can be accessed using:
const querystring = require('node:querystring');
querystring
is more performant than <URLSearchParams> but is not a
standardized API. Use <URLSearchParams> when performance is not critical or
when compatibility with browser code is desirable.