Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
目标
支持处理像这样不规整的URL,其query参数需要特殊处理
// 微信分享后在 hash 前面自动添加参数,导致页面链接不规范
https://m.iqianggou.com/?from=singlemessage&isappinstalled=0#bargain?id=646156&platform=5
copy
简单拷贝 JSON.parse(JSON.stringify(data))
;compact
清除数组中的空数据,如 ''
, 0
, undefined
, false
, NaN
compactObject
清除对象的无效数据,如 ''
, undefined
, null
parse
解析 url 的 query 参数,输出为对象stringify
对象转化为查询字符串import {
copy,
compact,
compactObject,
parse,
stringify,
} from '@xmini/qs';
// 非规范链接
const url = 'https://m.iqianggou.com/?from=singlemessage&isappinstalled=0#bargain?id=646156&platform=5'
const query = parse(url);
FAQs
qs
The npm package @xmini/qs receives a total of 2 weekly downloads. As such, @xmini/qs popularity was classified as not popular.
We found that @xmini/qs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.