# stream-through-p

> stream-through-p ================

Latest version **1.0.1** (published 2017-04-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install stream-through-p
pnpm add stream-through-p
yarn add stream-through-p
bun add stream-through-p
```

## 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.1 |
| Published | 2017-04-18 |
| First published | 2017-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | aredridel |

## Links

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

## Dependencies (1)

- [through2](https://npm.io/package/through2.md) ^2.0.3

## Recent versions

- 1.0.1 (latest) — 2017-04-18

## README

stream-through-p
================

Pass each datum in a stream through a function.

With promises!

Explanation
-----------

A wrapper around through2 that expects promises, rather than a context
sensitive calling convention. This should reduce boilerplate code for dealing
with the often-ignored encoding parameter, and focuses on the usual use-cases:
an asynchronous map over time.

It only operates in object mode. I find that explicit buffering and reblocking
is more useful than having strings automatically concatenated, and leaves the
interface agnostic of the mode of the streams.

Use
----

```
streamOfItems()
    .pipe(throughp(e => db.lookup(e)))
    .pipe(throughp(JSON.stringify))
    .pipe(process.stdout)
```

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