Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@smithy/querystring-parser
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@smithy/querystring-parser/latest.svg)](https://www.npmjs.com/package/@smithy/querystring-parser) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/querystring-parser.svg)](https://www.npmjs.com/package/@
@smithy/querystring-parser is an npm package designed to parse query strings into JavaScript objects and vice versa. It is useful for handling URL query parameters in web applications, making it easier to work with URL-encoded data.
Parse Query String
This feature allows you to parse a query string into a JavaScript object. The `parse` function takes a query string as input and returns an object with key-value pairs.
const { parse } = require('@smithy/querystring-parser');
const queryString = 'name=John&age=30&city=New%20York';
const parsed = parse(queryString);
console.log(parsed); // { name: 'John', age: '30', city: 'New York' }
Stringify Object to Query String
This feature allows you to convert a JavaScript object into a query string. The `stringify` function takes an object as input and returns a URL-encoded query string.
const { stringify } = require('@smithy/querystring-parser');
const obj = { name: 'John', age: '30', city: 'New York' };
const queryString = stringify(obj);
console.log(queryString); // 'name=John&age=30&city=New%20York'
The `query-string` package is a widely-used library for parsing and stringifying URL query strings. It offers similar functionality to @smithy/querystring-parser but also includes additional features like handling arrays and nested objects.
The `qs` package is another popular library for parsing and stringifying query strings. It provides more advanced features compared to @smithy/querystring-parser, such as support for nested objects, arrays, and custom delimiters.
The `url-search-params` package is a polyfill for the URLSearchParams API, which is natively available in modern browsers. It provides a similar interface for working with query strings, making it a good alternative to @smithy/querystring-parser for environments that do not support URLSearchParams natively.
FAQs
[![NPM version](https://img.shields.io/npm/v/@smithy/querystring-parser/latest.svg)](https://www.npmjs.com/package/@smithy/querystring-parser) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/querystring-parser.svg)](https://www.npmjs.com/package/@
The npm package @smithy/querystring-parser receives a total of 11,524,825 weekly downloads. As such, @smithy/querystring-parser popularity was classified as popular.
We found that @smithy/querystring-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.