# get-query-strings

> Gets url query string parameters

Latest version **1.4.0** (published 2018-06-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install get-query-strings
pnpm add get-query-strings
yarn add get-query-strings
bun add get-query-strings
```

## 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.4.0 |
| Published | 2018-06-25 |
| First published | 2018-05-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Luke Robertson https://github.com/designalchemy |
| Maintainers | designalchemy |
| Keywords | query, string, url, parameters |

## Links

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

## Dependencies (1)

- [mocha](https://npm.io/package/mocha.md) ^5.2.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2018-06-25
- 1.3.0 — 2018-06-21
- 1.2.0 — 2018-06-21
- 1.1.0 — 2018-05-27
- 1.0.6 — 2018-05-16
- 1.0.5 — 2018-05-16
- 1.0.4 — 2018-05-12
- 1.0.3 — 2018-05-12
- 1.0.2 — 2018-05-12
- 1.0.0 — 2018-05-12

## README

# Get URL query string parameters

Returns all the query string params in a object or gets a single param by name

### Usage

```
e.g http://my-awsome.website/welcome?name=luke&job=dev

import { allQueryStrings, queryString } from 'get-query-strings'
```

```
const params = allQueryStrings()

const params2 = allQueryStrings('?a=1&b=2')

const name = queryString('name'),

const name2 = queryString('name', '?name=luke'),

```

```
Output : 

console.log(params)

{
  name: luke, 
  job: dev
}

console.log(params2)

{
  a: 1,
  b: 2
}

console.log(name)

luke

console.log(name2)

luke
```

Please note : decodeURIComponent is used on both the KEY and the VALUE
Also will add a ? to the string if missing and passed in manually


## Authors

*   **Luke Robertson** - [DesignAlchemy](https://github.com/designalchemy/)

## License

Public

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