Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via pnpm

querystringify 2.2.0

Querystringify - Small, simple but powerful query string parser.
Package summary
Share
0
issues
1
license
1
MIT
Package created
3 Nov 2014
Version published
17 Aug 2020
Maintainers
4
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
querystringify@2.2.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of querystringify 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does querystringify do?

Querystringify is a remarkably lightweight and efficient query string parser. Designed to extract the essence of simplicity, the parser aids in transforming query strings into objects. While it may not cater to deeply nested or multi-level query strings, it's perfect for straightforward tasks requiring the processing of simple query strings.

How do you use querystringify?

Incorporating Querystringify into your project couldn't be easier, whether you're working in a server-side or client-side environment. Firstly, install the npm module using the following CLI command: npm install --save querystringify.

Subsequent to the module's installation, remember to incorporate it into your project:

'use strict';
var qs = require('querystringify');

Querystringify offers two main methods: parse() and stringify().

  • The parse() method converts a given query string into an object, indifferent to prefix variations (? , # or none.) Here are some examples:
qs.parse('?foo=bar');         // renders -> { foo: 'bar' }
qs.parse('#foo=bar');         // renders -> { foo: 'bar' }
qs.parse('foo=bar');          // renders -> { foo: 'bar' }
qs.parse('foo=bar&bar=foo');  // renders -> { foo: 'bar', bar: 'foo' }
qs.parse('foo&bar=foo');      // renders -> { foo: '', bar: 'foo' }
  • The stringify() function transforms an object into a query string. By default, the query string is returned without a ? prefix. Include a true as second parameter to get the prefix by default. Additionally, you could supply a string as second parameter, representing your custom prefix:
qs.stringify({ foo: bar });       // renders -> foo=bar
qs.stringify({ foo: bar }, true); // renders -> ?foo=bar
qs.stringify({ foo: bar }, '#');  // renders -> #foo=bar
qs.stringify({ foo: '' }, '&');   // renders -> &foo=

Where are the querystringify docs?

The Querystringify documentation and additional details concerning the parser's use and functionality can be found on its GitHub repository unshiftio/querystringify. For detailed interaction and use, get into the nitty-gritty of the readme document offered by the usefulness-packed repository.