# pull-sink-through

> convert a pull-stream sink (that takes a callback) into a through steam that outputs a single item. Useful when you have an api that needs to return a source stream, but may be either a source or an async function.

Latest version **0.0.0** (published 2016-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install pull-sink-through
pnpm add pull-sink-through
yarn add pull-sink-through
bun add pull-sink-through
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2016-02-28 |
| First published | 2016-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/pull-sink-through
- Repository: https://github.com/dominictarr/pull-sink-through
- Issues: https://github.com/dominictarr/pull-sink-through/issues
- npm.io page: https://npm.io/package/pull-sink-through

## Recent versions

- 0.0.0 (latest) — 2016-02-28

## README

# pull-sink-through

convert a pull-stream sink (that takes a callback)
into a through steam that outputs a single item.
Useful when you have an api that needs to return a source
stream, but may be either a source or an async function.

Used by map-filter-reduce, because if a reduce is included
it's a sink with a callback.

``` js
function sum () {
  return SinkThrough(function (cb) {
    pull.reduce(function (a, b) {
      return a + b
    }, 0, cb)
  })
}

pull(
  pull.count(100),
  sum,
  pull.collect(function (err, ary) {
    console.log(ary) // => [5500]
  })
)
```


## License

MIT

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