# js-http-build-query

> A JavaScript package to build URL-encoded http query string.

Latest version **1.1.0** (published 2022-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install js-http-build-query
pnpm add js-http-build-query
yarn add js-http-build-query
bun add js-http-build-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.1.0 |
| Published | 2022-05-24 |
| First published | 2019-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Muhaimenul Islam |
| Maintainers | muhaimenul |
| Keywords | http, url, query, string, request, parameter, URL-encode |

## Links

- npm: https://www.npmjs.com/package/js-http-build-query
- Repository: https://github.com/muhaimenul/js-http-build-query
- Homepage: https://github.com/muhaimenul/js-http-build-query#readme
- Issues: https://github.com/muhaimenul/js-http-build-query/issues
- npm.io page: https://npm.io/package/js-http-build-query

## 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.1.0 (latest) — 2022-05-24
- 1.0.1 — 2019-12-10

## README

# js-http-build-query
[![Created Badge](https://badges.pufler.dev/created/muhaimenul/js-http-build-query)](https://npm.io/package/js-http-build-query)
[![Created Badge](https://img.shields.io/github/license/muhaimenul/js-http-build-query)](https://npm.io/package/js-http-build-query)
[![Created Badge](https://img.shields.io/github/issues/muhaimenul/js-http-build-query)](https://npm.io/package/js-http-build-query)


A simple JavaScript package to generate URL-encoded HTTP Query String. Just create a object using query parameters and their values, and pass the object through this module to build query string (like `http_build_query()` in php).

## Installation:

```bash
$ npm i js-http-build-query
```

## Usage:

```javascript
const http_build_query = require('js-http-build-query')

// Simple object
let data = {
  roll: 143,
  message: 'hello world',
  url: 'https://example.com'
}

http_build_query(data) // roll=143&message=world&url=https://example.com


let complexData = {
  foo: "bar",
  items: {
      salt: "suger",
      quantity: [2, 3, 4]
   }
}

http_build_query(complexData) // foo=bar&items[salt]=suger&items[quantity][0]=2&items[quantity][1]=3&items[quantity][2]=4
```

## Contributing

[Muhaimenul Islam](https://github.com/muhaimenul)

## Security Vulnerabilities

If you discover a security vulnerability or bugs, please send an e-mail to Muhaimenul Islam via [i.muhaimen@gmail.com](mailto:i.muhaimen@gmail.com).

## License

The js-http-build-query package is open-sourced project licensed under the [MIT license](https://opensource.org/licenses/MIT).

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