
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.
@locustjs/querystring
Advanced tools
This library provides querystring utilities.
npm i @locustjs/querystring
parseQuery: Parses strings in querystring format and returns a json object.
Example 1: basic example
import { parseQuery } from 'locustjs-querystring';
var result = parseQuery('name=John%20Doe&age=23&city=UK&agree=true');
console.log(result);
/*
{
age: "23",
agree: "true",
city: "UK",
name: "John Doe",
}
*/
Example 2: enabling automatic-conversion
import { parseQuery } from 'locustjs-querystring';
var result = parseQuery('name=John%20Doe&age=23&city=UK&agree=true', true);
console.log(result);
/*
{
age: 23,
agree: true,
city: "UK",
name: "John Doe",
}
*/
createQuery: converts a javascript object into querystring.
Example 1: basic example
import { createQuery } from 'locustjs-querystring';
var result = createQuery({ name: 'John Doe', age: 23, city: 'UK', agree: true });
console.log(result);
/*
name=John%20Doe&age=23&city=UK&agree=true
*/
Example 2: using ignore props
import { createQuery } from 'locustjs-querystring';
var result = createQuery({ name: 'John Doe', age: 23, city: 'UK', agree: true }, 'age,city');
console.log(result);
/*
name=John%20Doe&agree=true
*/
QueryHelper: A helper object with two methods, parse() and stringify() that are maped to parseQuery and createQuery methods. This helper is exported as default object from library.
Example:
import QueryHelper from 'locustjs-querystring'
console.log(QueryHelper.parse('name=John%20Doe&agree=true')); // { name: 'John Doe', agree: 'true' }
console.log(QueryHelper.stringify({ name: 'John Doe', age: 23 })); // name=John%20Doe&age=23
FAQs
This library provides querystring utilities.
We found that @locustjs/querystring 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.