# @zcorky/query-string

> Easy query string in node and browser, without any dependencies, support parse/stringify/add/omit/pick

Latest version **1.0.2** (published 2018-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zcorky/query-string
pnpm add @zcorky/query-string
yarn add @zcorky/query-string
bun add @zcorky/query-string
```

## 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.0.2 |
| Published | 2018-11-22 |
| First published | 2018-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zero |
| Maintainers | uniquecolesmith |

## Links

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

## Recent versions

- 1.0.2 (latest) — 2018-11-22
- 1.0.1 — 2018-09-15
- 1.0.0 — 2018-09-15

## README

# query-string

[![NPM version](https://img.shields.io/npm/v/@zcorky/query-string.svg?style=flat)](https://www.npmjs.com/package/@zcorky/query-string)
[![Coverage Status](https://img.shields.io/coveralls/zcorky/query-string.svg?style=flat)](https://coveralls.io/r/zcorky/query-string)
[![Dependencies](https://david-dm.org/@zcorky/query-string/status.svg)](https://david-dm.org/@zcorky/query-string)
[![Build Status](https://travis-ci.com/zcorky/query-string.svg?branch=master)](https://travis-ci.com/zcorky/query-string)
![license](https://img.shields.io/github/license/zcorky/query-string.svg)
[![issues](https://img.shields.io/github/issues/zcorky/query-string.svg)](https://github.com/zcorky/query-string/issues)

> Easy query string in node and browser, without any dependencies, support parse/stringify/add/omit/pick.

### Install

```
$ npm install @zcorky/query-string
```

### Usage

```javascript
// import
import { stringify, parse } from '@zcorky/query-string';
import { add } from '@zcorky/query-string/lib/add';
import { omit } from '@zcorky/query-string/lib/omit';
import { pick } from '@zcorky/query-string/lib/pick';

// 1 parse: support number/bool/string
parse('?token=Uakgb_J5m9g~0JDMbcJqLJ&active=true&offset=10&limit=100');
// => { token: 'Uakgb_J5m9g~0JDMbcJqLJ', active: 'true', offset: '10', limit: '100' }

// 2 stringify
stringify({ active: true, offset: 10 });
// => 'active=true&offset=10'

// 3 add
add('?token=Uakgb_J5m9g~0JDMbcJqLJ', { lang: 'en' });
// => 'token=Uakgb_J5m9g~0JDMbcJqLJ&lang=en'

// 4 omit
omit('?token=Uakgb_J5m9g~0JDMbcJqLJ&offset=10', ['token']);
// => 'offset=10'

// 5 pick
pick('?token=Uakgb_J5m9g~0JDMbcJqLJ&offset=10', ['token']);
// => 'token=Uakgb_J5m9g~0JDMbcJqLJ'
```

### Relatived
* node querystring
* [query-string](https://www.npmjs.com/package/query-string)

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