querystring.escape(str)


querystring.escape() 方法对给定的 str 执行 URL 百分比编码,其方式针对 URL 查询字符串的特定要求进行了优化。

🌐 The querystring.escape() method performs URL percent-encoding on the given str in a manner that is optimized for the specific requirements of URL query strings.

querystring.escape() 方法被 querystring.stringify() 使用,通常不期望直接使用它。它之所以被导出,主要是为了允许应用代码在必要时通过将 querystring.escape 指定为其他函数来提供替代的百分比编码实现。

🌐 The querystring.escape() method is used by querystring.stringify() and is generally not expected to be used directly. It is exported primarily to allow application code to provide a replacement percent-encoding implementation if necessary by assigning querystring.escape to an alternative function.