# pull-split

> split ported to pull-stream style

Latest version **0.2.1** (published 2019-10-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install pull-split
pnpm add pull-split
yarn add pull-split
bun add pull-split
```

## 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.2.1 |
| Published | 2019-10-02 |
| First published | 2013-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

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

## Dependencies (1)

- [pull-through](https://npm.io/package/pull-through.md) ~1.0.6

## Recent versions

- 0.2.1 (latest) — 2019-10-02
- 0.2.0 — 2016-03-02
- 0.1.3 — 2016-01-27
- 0.1.2 — 2013-07-29
- 0.1.1 — 2013-05-05
- 0.1.0 — 2013-03-25

## README

# pull-split

[split](https://github.com/dominictarr/split) ported to
[pull-stream](https://github.com/dominictarr/pull-stream) style.

## Example

``` js
var pull = require('pull-stream')
var split = require('pull-split')

pull(
  textStream
  split(),
  output
)
```

if the textStream is buffers, and contain UTF8
(it probably will if you have german or chinese friends, etc)
then you MUST use this with `pull-utf8-decoder`

``` js
var pull = require('pull-stream')
var split = require('pull-split')
var utf8 = require('pull-utf8-decoder')

pull(
  textStream
  utf8(),
  split(),
  output
)
```

## split(matcher, mapper, reverse, skipLast)

### matcher - string or regexp.

unit to split by, defaults to `\n`

### mapper - function

function to apply to each line matched.

### reverse - boolean

if true, emit lines in reverse. use this if the input is a file
you are reading backwards.

### skipLast - boolean

use this to skip the last value if it is and empty string `''`
if this is not set then the behavior is the same as `String#split`

## License

MIT

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