# object-param

> 对象解析成form表单提交时需要的格式

Latest version **1.0.2** (published 2017-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install object-param
pnpm add object-param
yarn add object-param
bun add object-param
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-06-23 |
| First published | 2017-06-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mcdyzg |
| Maintainers | mcdyzg |

## Links

- npm: https://www.npmjs.com/package/object-param
- Repository: https://github.com/mcdyzg/object-param
- Homepage: https://github.com/mcdyzg/object-param#readme
- Issues: https://github.com/mcdyzg/object-param/issues
- npm.io page: https://npm.io/package/object-param

## Recent versions

- 1.0.2 (latest) — 2017-06-23
- 1.0.1 — 2017-06-16
- 1.0.0 — 2017-06-10

## README

# object-param

[![Travis][build-badge]][build]
[![npm package][npm-badge]][npm]
[![Coveralls][coveralls-badge]][coveralls]

Describe object-param here.

[build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
[build]: https://travis-ci.org/user/repo

[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
[npm]: https://www.npmjs.org/package/npm-package

[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
[coveralls]: https://coveralls.io/github/user/repo

var param = require('object-param')

/**
 * 功能和`Zepto.param`一样
 * @param obj {Object}
 * @param traditional {Boolean}
 * @returns {string}
 * param({ foo: { one: 1, two: 2 }}) // "foo[one]=1&foo[two]=2)"
 * param({ ids: [1,2,3] })           // "ids[]=1&ids[]=2&ids[]=3"
 * param({ ids: [1,2,3] }, true)     // "ids=1&ids=2&ids=3"
 * param({ foo: 'bar', nested: { will: 'not be ignored' }})    // "foo=bar&nested[will]=not+be+ignored"
 * param({ foo: 'bar', nested: { will: 'be ignored' }}, true)  // "foo=bar&nested=[object+Object]"
 * param({ id: function(){ return 1 + 2 } })  // "id=3"
 */

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