
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
query-string-parser
Advanced tools
A JavaScript query string parser which works with Rack style (Ruby on Rails and Sinatra style) query string.
"?a=1&b=2"npm i query-string-parser
Node.js environment
const { toQuery, fromQuery } = require('query-string-parser')
const queryString = toQuery({ "a": 1 })
=> "a=1"
fromQuery("a=1")
=> { "a": "1" }
Browser environment
paramObject = {
posts: [
{
'title': 'Post 1',
'tags': ['node', 'script', 'javascript']
},
{
'title': 'Post 2',
'tags': ['node', 'why', 'not']
}
],
author: "Somebody",
date: "Today"
}
queryString = toQuery(paramObject)
=> "posts%5B%5D%5Btitle%5D=Post%201&posts%5B%5D%5Btags%5D%5B%5D=node&posts%5B%5D%5Btags%5D%5B%5D=script&posts%5B%5D%5Btags%5D%5B%5D=javascript&posts%5B%5D%5Btitle%5D=Post%202&posts%5B%5D%5Btags%5D%5B%5D=node&posts%5B%5D%5Btags%5D%5B%5D=why&posts%5B%5D%5Btags%5D%5B%5D=not&author=Somebody&date=Today"
parseQuery(queryString)
=> And the object comes back
objectToQueryString and queryStringToObjectIf you find any bugs or you want any features, please open issue or submit pull request.
FAQs
Rack style query string parser for Node.js.
The npm package query-string-parser receives a total of 429 weekly downloads. As such, query-string-parser popularity was classified as not popular.
We found that query-string-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.