# pull-flat-merge

> Flat map for pull streams

Latest version **2.1.0** (published 2023-10-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install pull-flat-merge
pnpm add pull-flat-merge
yarn add pull-flat-merge
bun add pull-flat-merge
```

## 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.1.0 |
| Published | 2023-10-27 |
| First published | 2016-10-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | nichoth |
| Maintainers | nichoth |
| Keywords | merge, pull, stream, pull-stream, flat-merge, flat, flatten, map |

## Links

- npm: https://www.npmjs.com/package/pull-flat-merge
- Repository: https://github.com/nichoth/pull-flat-merge
- Homepage: https://github.com/nichoth/pull-flat-merge#readme
- Issues: https://github.com/nichoth/pull-flat-merge/issues
- npm.io page: https://npm.io/package/pull-flat-merge

## Dependencies (2)

- [pull-many](https://npm.io/package/pull-many.md) ^1.0.8
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.4.5

## 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.1.0 (latest) — 2023-10-27
- 2.0.3 — 2018-09-04
- 2.0.2 — 2017-05-11
- 2.0.1 — 2017-04-21
- 2.0.0 — 2017-04-21
- 1.2.0 — 2017-03-23
- 1.1.2 — 2017-03-15
- 1.1.1 — 2017-03-15
- 1.1.0 — 2017-02-03
- 1.0.1 — 2016-12-05
- 1.0.0 — 2016-12-05
- 0.0.2 — 2016-11-17
- 0.0.1 — 2016-11-13
- 0.0.0 — 2016-10-17

## README

# pull flat merge

A transform that takes a stream of streams and emits their values, in the order they arrive. This is in contrast to `.flatten`, which keeps the original order.

## example

join:

```js
var test = require('tape')
var S = require('pull-stream')
var join = require('pull-flat-merge')

test('flat merge', function (t) {
    t.plan(2)
    var ss = S.values([
        S.values([1,2,3]),
        S.values(['a', 'b', 'c'])
    ])

    S(
        ss,
        join(),
        S.collect(function (err, evs) {
            t.error(err)
            t.deepEqual(evs, [1,'a',2,'b',3,'c'], 'should emit the events')
        })
    )
})
```

chain:

```js
// this is equivalent to `map` followed by `join` 
var S = require('pull-stream')
var chain = require('pull-flat-merge/chain')

S(
    S.values([1,2,3]),
    chain(function (n) {
        return S.once(n)
    }),
    S.log()
)
```

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