# @jacobbubu/pull-abortable

> [![Build Status](https://github.com/jacobbubu/pull-abortable/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/pull-abortable/actions?query=workflow%3A%22Build+and+Release%22) [![Coverage Status](https://coveralls.io/repos/github/ja

Latest version **1.0.1** (published 2020-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jacobbubu/pull-abortable
pnpm add @jacobbubu/pull-abortable
yarn add @jacobbubu/pull-abortable
bun add @jacobbubu/pull-abortable
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-08-24 |
| First published | 2020-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | jacobbubu |
| Maintainers | jacobbubu |

## Links

- npm: https://www.npmjs.com/package/@jacobbubu/pull-abortable
- Repository: https://github.com/jacobbubu/pull-abortable
- Homepage: https://github.com/jacobbubu/pull-abortable#readme
- Issues: https://github.com/jacobbubu/pull-abortable/issues
- npm.io page: https://npm.io/package/@jacobbubu/pull-abortable

## Recent versions

- 1.0.1 (latest) — 2020-08-24
- 1.0.0 — 2020-08-23

## README

# @jacobbubu/pull-abortable

[![Build Status](https://github.com/jacobbubu/pull-abortable/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/pull-abortable/actions?query=workflow%3A%22Build+and+Release%22)
[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/pull-abortable/badge.svg)](https://coveralls.io/github/jacobbubu/pull-abortable)
[![npm](https://img.shields.io/npm/v/@jacobbubu/pull-abortable.svg)](https://www.npmjs.com/package/@jacobbubu/pull-abortable/)

> Rewriting the [pull-abortable](https://github.com/dominictarr/pull-abortable) with TypeScript.

# pull-abortable

a pull-stream that may be aborted from the outside.

## why rewriting?

* Familiarity with the original author's intent
* Strong type declarations for colleagues to understand and migrate to other programming languages

## example

``` js
import * as pull from 'pull-stream'
import Abortable from '@jacobbubu/pull-abortable'

const abortable = Abortable()
pull(
  source,
  abortable,
  sink
)
//at any time you can abort the pipeline,
//the source will be cleaned up, and any
//error will be passed to the sink next time it reads.
atAnyTime(function () {
  abortable.abort()
})

// abort the stream and end with an error
abortable.abort(new Error('example'))
```

## License

MIT

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