# callbag-pause

> 👜 Callbag Pause let you pause/resume your callbag stream with a boolean var.

Latest version **1.0.0** (published 2018-12-28) · MIT license · 0 weekly downloads

## Install

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

## 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 | 1.0.0 |
| Published | 2018-12-28 |
| First published | 2018-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Felix Rodriguez Perez |
| Maintainers | felixdrp |
| Keywords | callbag, pause |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2018-12-28

## README

# callbag-pause
👜 Callbag Pause is a [Callbag 👜](https://github.com/callbag/callbag) that will convert any callbag stream into one that can be paused and resumed via an external variable.

Many thanks to 
André Staltz (staltz) for [Callbag 👜](https://github.com/callbag/callbag) 
and to 
Erik Rasmussen (erikras) for [callbag-pausable ⏯️](https://github.com/erikras/callbag-pausable)

## usage example

You can run the example by:

```
npm intall callbag-pause
npm run example
```

```js
import interval from 'callbag-interval'
import subscribe from 'callbag-subscribe'
import take from 'callbag-take'
import pipe from 'callbag-pipe'
import pause from './'

let pause = false

pipe(
    interval(100),
    pausable(() => pause),
    take(6),
    subscribe(console.log)
)

setTimeout(() => {
  console.log('PAUSING')
  pause = true
}, 400)
setTimeout(() => {
  console.log('RESUMING')
  pause = false
}, 1000)

/*
Result:
    0
    1
    2
    PAUSING
    RESUMING
    9
    10
    11
*/
```

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