# rmlines

> Streaming line remover

Latest version **2.0.0** (published 2019-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install rmlines
pnpm add rmlines
yarn add rmlines
bun add rmlines
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-05-28 |
| First published | 2016-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | t1st3 |
| Maintainers | t1st3 |
| Keywords | line, remove, stream |

## Links

- npm: https://www.npmjs.com/package/rmlines
- Repository: https://github.com/t1st3/rmlines
- Homepage: https://github.com/t1st3/rmlines#readme
- Issues: https://github.com/t1st3/rmlines/issues
- npm.io page: https://npm.io/package/rmlines

## Dependencies (1)

- [through2](https://npm.io/package/through2.md) ^3.0.0

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

- 2.0.0 (latest) — 2019-05-28
- 1.0.0 — 2018-05-06
- 0.2.0 — 2018-05-06
- 0.1.3 — 2017-09-20
- 0.1.2 — 2017-04-01
- 0.1.1 — 2016-11-08

## README

# rmlines [![Build Status Travis](https://travis-ci.org/t1st3/rmlines.svg?branch=master)](https://travis-ci.org/t1st3/rmlines) [![codecov](https://codecov.io/gh/t1st3/rmlines/badge.svg?branch=master)](https://codecov.io/gh/t1st3/rmlines?branch=master)

> Streaming line remover

`rmlines` is a [Transform stream](https://nodejs.org/api/stream.html#stream_duplex_and_transform_streams) that remove lines (based on line numbers) from any string.


## Install

```
$ npm install --save rmlines
```


## Usage

Suppose a file named `example.txt` containing the following:

```
abc
def
ghi
jkl
mno
```

then, `rmlines()` returns a transform stream that accepts strings and emits the string without unwanted lines (here: line 2 and line 4)

```js
const rmlines = require('rmlines');
let txt = '';

fs.createReadStream('example.txt')
  .pipe(rmlines([2, 4]))
  .on('data', function (data) {
    txt += data;
  }).on('end', function () {
    console.log((txt === 'abc\nghi\nmno\n'));
    // => true
  });
```

## Options

### maxLength

Type: `integer`

Set a buffer size limit.


## API

### rmlines(lines, [options])

#### lines

Type: `integer|array`

The number(s) of the line(s) that must be removed.

#### options

Type: `object`<br>
as described above


## Related

* [rmlines-cli](https://github.com/t1st3/rmlines-cli) | CLI for rmlines
* [gulp-rmlines](https://github.com/t1st3/gulp-rmlines) | rmlines as a [`gulp`](http://gulpjs.com/) plugin
* [gulp-rmlines](https://github.com/t1st3/grunt-rmlines) | rmlines as a [`Grunt`](http://gruntjs.com/) plugin


## License

MIT © [t1st3](https://t1st3.com)

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