Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@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 14,191,693 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 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.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.