# cjs-query

> Parse the given location search string into object.

Latest version **1.5.1** (published 2018-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install cjs-query
pnpm add cjs-query
yarn add cjs-query
bun add cjs-query
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2018-08-04 |
| First published | 2016-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Stanislav Kalashnik |
| Maintainers | cjssdk |
| Keywords | commonjs, sdk, cjssdk, framework, query, parse, stringify |

## Links

- npm: https://www.npmjs.com/package/cjs-query
- Repository: https://github.com/cjssdk/query
- Homepage: https://github.com/cjssdk/query#readme
- Issues: https://github.com/cjssdk/query/issues
- npm.io page: https://npm.io/package/cjs-query

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.5.1 (latest) — 2018-08-04
- 1.4.0 — 2016-10-20

## README

Query string handler
====================

[![build status](https://img.shields.io/travis/cjssdk/query.svg?style=flat-square)](https://travis-ci.org/cjssdk/query)
[![npm version](https://img.shields.io/npm/v/cjs-query.svg?style=flat-square)](https://www.npmjs.com/package/cjs-query)
[![dependencies status](https://img.shields.io/david/cjssdk/query.svg?style=flat-square)](https://david-dm.org/cjssdk/query)
[![devDependencies status](https://img.shields.io/david/dev/cjssdk/query.svg?style=flat-square)](https://david-dm.org/cjssdk/query?type=dev)
[![Gitter](https://img.shields.io/badge/gitter-join%20chat-blue.svg?style=flat-square)](https://gitter.im/DarkPark/cjssdk)
[![RunKit](https://img.shields.io/badge/RunKit-try-yellow.svg?style=flat-square)](https://npm.runkit.com/cjs-query)


Module to parse query part of the location URL.


## Installation ##

```bash
npm install cjs-query
```


## Usage ##

Add to the scope:

```js
var query = require('cjs-query');
```

Parse some parameters:

```js
// gives {param: '5000', another_param: 'another_value'}
// note that the type of param value is string
console.log(query.parse('param=5000&another_param=another_value'));
```

Parse current document query string:

```js
console.log(query.parse(document.location.search.substring(1)));
```

Stringify query params:

```js
// gives 'param=128'
console.log(query.stringify({param: 128}));
```


## Contribution ##

If you have any problems or suggestions please open an [issue](https://github.com/cjssdk/query/issues)
according to the contribution [rules](.github/contributing.md).


## License ##

`cjs-query` is released under the [MIT License](license.md).

---
_Source: https://npm.io/package/cjs-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
