# gr-query-parse

> Realiza o parse e stringify da query nas requisições e respostas.

Latest version **0.0.2** (published 2019-05-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install gr-query-parse
pnpm add gr-query-parse
yarn add gr-query-parse
bun add gr-query-parse
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-05-01 |
| First published | 2019-05-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Geilson Ribeiro Mirandola |
| Maintainers | geilsonrm |
| Keywords | query, request, express, javascript |

## Links

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

## 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

- 0.0.2 (latest) — 2019-05-01
- 0.0.1 — 2019-05-01

## README

# gr-query-parse

Realiza o parse e stringify da query nas requisições e respostas.

Realiza o encodeURI e decodeURI.

####Instalação　

```javascript
npm install gr-query-parse
```

####Teste (Stringify)

```javascript
const gr = require('gr-query-parse')

let ob = {
    order: 'desc',
    vehicle: { factory: 'Hyundai', model: 'hb20' },
    attributes: ['locale', 'color', 'price']
}

console.log( gr.stringify(ob) )

// order=desc&vehicle[factory]=Hyundai&vehicle[model]=hb20&attributes[]=locale&attributes[]=color&attributes[]=price
```


####Teste (Parse)

```javascript
const gr = require('gr-query-parse')

// Request:
'localhost:8080/search?order=desc&vehicle[factory]=Hyundai&vehicle[model]=hb20&attributes[]=locale&attributes[]=color&attributes[]=price' 

// Node.js:
app.get('/search', (req, res) => {
    console.log(req.query)
    res.sendStatus(202)
})

// console.log( gr.parse(url) )

{
    order: 'desc',
    vehicle: { factory: 'Hyundai', model: 'hb20' },
    attributes: ['locale', 'color', 'price']
}
```

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