# parse-formdata

> Parse formdata in Node

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

## Install

```sh
npm install parse-formdata
pnpm add parse-formdata
yarn add parse-formdata
bun add parse-formdata
```

## 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 | 2017-06-28 |
| First published | 2017-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | yoshuawuyts |
| Keywords | parse, form, formdata, node |

## Links

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

## Dependencies (4)

- [pez](https://npm.io/package/pez.md) ^2.1.5
- [pump](https://npm.io/package/pump.md) ^1.0.2
- [xtend](https://npm.io/package/xtend.md) ^4.0.1
- [content](https://npm.io/package/content.md) ^3.0.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-06-28
- 1.0.1 — 2017-06-28
- 1.0.0 — 2017-06-28

## README

# parse-formdata
[![npm version][2]][3] [![build status][4]][5]
[![downloads][8]][9] [![js-standard-style][10]][11]

Parse formdata in Node.

## Usage

```js
var parseFormdata = require('parse-formdata')
var http = require('http')

http.createServer(function (req, res) {
  parseFormdata(req, function (err, data) {
    if (err) throw err
    console.log('fields:', data.fields)
    data.parts.forEach(function (part) {
      console.log('part:', part.fieldname)
    })
    res.end('Be kind to each other')
  })
}).listen(8080)
```

## API
### `parseFormdata(req, cb(err, data))`
Parse formdata from an HTTP request. `data` has the following fields:
- __fields:__ key-value data from fields
- __parts:__ an array of streams for the multipart file uploads
- __preamble:__ an array of data from the `preamble` event
- __epilogue:__ an array of data from the `epilogue` event

## See Also
- [yoshuawuyts/validate-formdata](https://github.com/yoshuawuyts/validate-formdata/)
- [yoshuawuyts/multipart-read-stream](https://github.com/yoshuawuyts/multipart-read-stream)

## License
[MIT](https://tldrlegal.com/license/mit-license)

[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/parse-formdata.svg?style=flat-square
[3]: https://npmjs.org/package/parse-formdata
[4]: https://img.shields.io/travis/yoshuawuyts/parse-formdata/master.svg?style=flat-square
[5]: https://travis-ci.org/yoshuawuyts/parse-formdata
[6]: https://img.shields.io/codecov/c/github/yoshuawuyts/parse-formdata/master.svg?style=flat-square
[7]: https://codecov.io/github/yoshuawuyts/parse-formdata
[8]: http://img.shields.io/npm/dm/parse-formdata.svg?style=flat-square
[9]: https://npmjs.org/package/parse-formdata
[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[11]: https://github.com/feross/standard

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