# streamiterator

> Turns browser fetch stream into asynchronous iterator

Latest version **2.0.8** (published 2020-05-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install streamiterator
pnpm add streamiterator
yarn add streamiterator
bun add streamiterator
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.8 |
| Published | 2020-05-09 |
| First published | 2017-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vadzim Zieńka |
| Maintainers | vadzim |
| Keywords | fetch, stream, iterator, iterable, async, asynchronous, ReadableStream, AsyncIterator |

## Links

- npm: https://www.npmjs.com/package/streamiterator
- Repository: https://github.com/vadzim/streamiterator
- Homepage: https://github.com/vadzim/streamiterator#readme
- Issues: https://github.com/vadzim/streamiterator/issues
- npm.io page: https://npm.io/package/streamiterator

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 2.0.8 (latest) — 2020-05-09
- 1.3.1 — 2018-01-15
- 1.3.0 — 2017-10-05
- 1.2.3 — 2017-09-01
- 1.2.2 — 2017-09-01
- 1.2.1 — 2017-09-01
- 1.2.0 — 2017-08-31
- 1.1.6 — 2017-08-31
- 1.1.5 — 2017-08-31
- 1.1.4 — 2017-08-31
- 1.1.3 — 2017-08-31
- 1.1.2 — 2017-08-31
- 1.1.1 — 2017-08-30
- 1.1.0 — 2017-08-30
- 1.0.17 — 2017-08-30
- … 16 more at https://npm.io/package/streamiterator/versions

## README

# streamiterator

Turns browser streams into asynchronous iterator. This works with `fetch` responses, `fetch` body, files, blobs, readable streams.
For compatibility reasons works with `node-fetch` too.

```js
import { streamiterator } from "streamiterator"
import split from "split"

async function DoIt() {
	for await (const chunk of streamiterator(fetch('https://api/data'))) {
		console.log('Read chunk:', chunk)
	}
}

// or in more verbose but more explicit way:

async function DoIt() {
	const response = await fetch('https://api/data')
	for await (const chunk of streamiterator(response.body.getReader())) {
		console.log('Read chunk:', chunk)
	}
}
```

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