Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

querystring

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

querystring

Node's querystring module for all engines.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19M
increased by10.51%
Maintainers
2
Weekly downloads
 
Created

What is querystring?

The querystring npm package is used for parsing and formatting URL query strings. It provides utilities for working with the query string of a URL, such as parsing a query string into an object, stringifying an object into a query string, and handling escape and unescape of URL query strings.

What are querystring's main functionalities?

Parsing a query string

This feature is used to parse a URL query string into an object where each key-value pair is represented as a property.

const querystring = require('querystring');
const parsed = querystring.parse('foo=bar&abc=xyz&abc=123');

Stringifying an object

This feature converts an object into a URL query string, with proper formatting and escaping.

const querystring = require('querystring');
const stringified = querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });

Escaping and unescaping

These functions are used to manually escape and unescape query string values.

const querystring = require('querystring');
const escaped = querystring.escape('foo@bar.com');
const unescaped = querystring.unescape('foo%40bar.com');

Other packages similar to querystring

Keywords

FAQs

Package last updated on 15 Feb 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc