# multipart-stream

> Simple streaming nodejs module to build http multipart bodies.

Latest version **2.0.1** (published 2016-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install multipart-stream
pnpm add multipart-stream
yarn add multipart-stream
bun add multipart-stream
```

## 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 | 2.0.1 |
| Published | 2016-03-11 |
| First published | 2014-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Hendrik Cech |
| Maintainers | hendrikcech |
| Keywords | multipart, stream, request, http, streaming |

## Links

- npm: https://www.npmjs.com/package/multipart-stream
- Repository: https://github.com/hendrikcech/multipart-stream
- Homepage: https://github.com/hendrikcech/multipart-stream#readme
- Issues: https://github.com/hendrikcech/multipart-stream/issues
- npm.io page: https://npm.io/package/multipart-stream

## Dependencies (3)

- [inherits](https://npm.io/package/inherits.md) ^2.0.1
- [is-stream](https://npm.io/package/is-stream.md) ^1.0.1
- [sandwich-stream](https://npm.io/package/sandwich-stream.md) ^1.0.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2016-03-11
- 2.0.0 — 2015-08-11
- 1.0.0 — 2014-04-21

## README

# multipart-stream
Simple streaming nodejs module to build http multipart bodies. Use [browserify](https://github.com/substack/browserify) to make it browser-compatible.

[![testling badge](https://ci.testling.com/hendrikcech/multipart-stream.png)](https://ci.testling.com/hendrikcech/multipart-stream)

## install
	npm install multipart-stream

# usage
```javascript
var Multipart = require('multipart-stream')

// returns a readable stream
var mp = new Multipart()

mp.addPart({
	// by default no headers are set
	headers: {
		'Content-Type': 'text/plain'
	},
	// pass either a string, a buffer or a readable stream
	body: 'Simple string'
})

var data = ''
mp.on('data', function(d) {
	data += d
}).on('end', function() {
	console.log(data)
})
```

# test
	npm test

# license
The MIT License (MIT)

Copyright (c) 2014 Hendrik Cech

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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