Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
fast-querystring
Advanced tools
Fast query-string parser and stringifier to replace the legacy node:querystring
module.
npm i fast-querystring
parse
and stringify
methods from node:querystring
module&
separator as defaultstring
foo=bar&foo=baz
parses into {foo: ['bar', 'baz']}
foo=bar&hola
parses into {foo: 'bar', hola: ''}
node:querystring
)const qs = require('fast-querystring')
// Parsing a querystring
console.log(qs.parse('hello=world&foo=bar&values=v1&values=v2'))
// {
// hello: 'world',
// foo: 'bar',
// values: ['v1', 'v2']
// }
// Stringifying an object
console.log(qs.stringify({ foo: ['bar', 'baz'] }))
// 'foo=bar&foo=baz'
> node benchmark/parse.mjs
╔═════════════════════════════════════════╤═════════╤═══════════════════╤═══════════╗
║ Slower tests │ Samples │ Result │ Tolerance ║
╟─────────────────────────────────────────┼─────────┼───────────────────┼───────────╢
║ qs │ 10000 │ 350884.75 op/sec │ ± 1.36 % ║
║ query-string │ 10000 │ 383165.31 op/sec │ ± 1.22 % ║
║ querystringify │ 1500 │ 530280.43 op/sec │ ± 0.90 % ║
║ @aws-sdk/querystring-parser │ 2000 │ 556657.27 op/sec │ ± 0.79 % ║
║ URLSearchParams-with-Object.fromEntries │ 10000 │ 845766.67 op/sec │ ± 2.85 % ║
║ URLSearchParams-with-construct │ 10000 │ 1158368.83 op/sec │ ± 4.28 % ║
║ node:querystring │ 2000 │ 1460476.58 op/sec │ ± 0.96 % ║
║ querystringparser │ 10000 │ 1976384.97 op/sec │ ± 4.11 % ║
╟─────────────────────────────────────────┼─────────┼───────────────────┼───────────╢
║ Fastest test │ Samples │ Result │ Tolerance ║
╟─────────────────────────────────────────┼─────────┼───────────────────┼───────────╢
║ fast-querystring │ 10000 │ 2123713.08 op/sec │ ± 2.87 % ║
╚═════════════════════════════════════════╧═════════╧═══════════════════╧═══════════╝
> node benchmark/stringify.mjs
╔══════════════════════════════╤═════════╤═══════════════════╤═══════════╗
║ Slower tests │ Samples │ Result │ Tolerance ║
╟──────────────────────────────┼─────────┼───────────────────┼───────────╢
║ query-string │ 10000 │ 310383.60 op/sec │ ± 1.14 % ║
║ qs │ 10000 │ 354332.59 op/sec │ ± 1.23 % ║
║ @aws-sdk/querystring-builder │ 10000 │ 411500.38 op/sec │ ± 1.30 % ║
║ http-querystring-stringify │ 1500 │ 535883.47 op/sec │ ± 1.00 % ║
║ URLSearchParams │ 10000 │ 594068.52 op/sec │ ± 1.61 % ║
║ querystringparser │ 10000 │ 766081.64 op/sec │ ± 2.18 % ║
║ querystringify │ 10000 │ 914083.38 op/sec │ ± 1.67 % ║
║ node:querystring │ 4000 │ 1822536.85 op/sec │ ± 0.91 % ║
╟──────────────────────────────┼─────────┼───────────────────┼───────────╢
║ Fastest test │ Samples │ Result │ Tolerance ║
╟──────────────────────────────┼─────────┼───────────────────┼───────────╢
║ fast-querystring │ 10000 │ 2186435.62 op/sec │ ± 3.48 % ║
╚══════════════════════════════╧═════════╧═══════════════════╧═══════════╝
FAQs
A fast alternative to legacy querystring module
The npm package fast-querystring receives a total of 2,452,178 weekly downloads. As such, fast-querystring popularity was classified as popular.
We found that fast-querystring demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.