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

cjs-parse-query

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cjs-parse-query

Parse the given location search string into object.

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Query string parser

NPM version Dependencies Status Gitter

Module to parse query part of the location URL.

Installation

npm install cjs-parse-query

Usage

Add to the scope:

var parseQuery = require('cjs-parse-query');

Parse some parameters:

// gives {param: 'value', another_param: 'another_value'}
console.log(parseQuery('param=value&another_param=another_value'));

Parse current document query string:

console.log(parseQuery(document.location.search.substring(1)));

Debug mode

There is a global var DEBUG which activates additional consistency checks and protection logic not available in release mode.

Contribution

If you have any problem or suggestion please open an issue here. Pull requests are welcomed with respect to the JavaScript Code Style.

License

cjs-parse-query is released under the GPL-3.0 License.

Keywords

FAQs

Package last updated on 28 Dec 2015

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