# char-split

> splits an stream on a character (e.g. \n) and emits the strings in between

Latest version **0.2.0** (published 2013-07-02) · zlib license · 0 weekly downloads

## Install

```sh
npm install char-split
pnpm add char-split
yarn add char-split
bun add char-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.0 |
| Published | 2013-07-02 |
| First published | 2013-05-31 |
| Weekly downloads | 0 |
| License | zlib |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Marcello Bastéa-Forte |
| Maintainers | marcello |
| Keywords | streams, split, newline, newlines |

## Links

- npm: https://www.npmjs.com/package/char-split
- Repository: https://github.com/marcello3d/node-char-split
- npm.io page: https://npm.io/package/char-split

## Dependencies (1)

- [through](https://npm.io/package/through.md) 2.3.4

## 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

- 0.2.0 (latest) — 2013-07-02
- 0.1.0 — 2013-05-31

## README

char-split
=================

Splits a string stream on a character (e.g. \\n) and emits the strings in between.

Install
-------

```
npm install char-split
```

Usage / Examples
----------------

```js
var split = require('char-split')

stream.pipe(
    split()
        .on('data', function(data) {
            // line of text
        })
        .on('end', function(data) {
            // end of stream
        })
        .on('error', function(error) {
            // error in stream
        })
)
```

Optional arguments:

```js
split(character = '\n')
```

Notes
-----

For simplicity, char-split doesn't support multi-character split strings. This means splitting on \r\n won't work.

License
-------
Open source software under the [zlib license](LICENSE).

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