# callbag-partition

> 👜 Callbag operator that splits the source into two, based on predicate function.

Latest version **1.0.0** (published 2018-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install callbag-partition
pnpm add callbag-partition
yarn add callbag-partition
bun add callbag-partition
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-05-29 |
| First published | 2018-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mateusz Burzyński |
| Maintainers | andarist |
| Keywords | callbag, callbags, sample |

## Links

- npm: https://www.npmjs.com/package/callbag-partition
- Repository: https://github.com/Andarist/callbag-partition
- Homepage: https://github.com/Andarist/callbag-partition#readme
- Issues: https://github.com/Andarist/callbag-partition/issues
- npm.io page: https://npm.io/package/callbag-partition

## Dependencies (1)

- [callbag-filter](https://npm.io/package/callbag-filter.md) ^1.0.1

## Recent versions

- 1.0.0 (latest) — 2018-05-29

## README

# callbag-partition

Callbag operator that splits the source into two, one with values that satisfy a predicate, and another with values that don't satisfy the predicate.

## Example

```js
import forEach from 'callbag-for-each'
import fromIter from 'callbag-from-iter'
import partition from 'callbag-partition'
import pipe from 'callbag-pipe'

const [even$, odd$] = pipe(
  fromIter([1, 2, 3, 4, 5, 6]),
  partition(i => i % 2 === 0),
)

pipe(
  even$,
  forEach(val => {
    // will log 2, 4, 6
    console.log(val)
  }),
)

pipe(
  odd$,
  forEach(val => {
    // will log 1, 3, 5
    console.log(val)
  }),
)
```

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