# line-to-line

> Read file line by line

Latest version **1.0.1** (published 2016-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install line-to-line
pnpm add line-to-line
yarn add line-to-line
bun add line-to-line
```

## 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 | 1.0.1 |
| Published | 2016-08-19 |
| First published | 2016-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.4.* |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Anderson Vinicius avincius.adorno@gmail.com |
| Maintainers | avinicius |
| Keywords | line to line, readline |

## Links

- npm: https://www.npmjs.com/package/line-to-line
- Repository: https://github.com/seusoft/line-to-line
- Homepage: https://github.com/seusoft/line-to-line#readme
- Issues: https://github.com/seusoft/line-to-line/issues
- npm.io page: https://npm.io/package/line-to-line

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-08-19
- 1.0.0 — 2016-08-19

## README

# Line to Line

> A module to read files line by line, returning read lines and the total of bytes read.

# Install
```
# npm install line-to-line
```

# Test
```
$ npm install
$ npm test
```

# API

## Parameters
- stream - Stream object.

## Events
- `line` emit line of the file.

- `close` emit close of stream.

- `error` emit error of stream.

- `open` emit open of stream.

## Return
- EventEmitter

# Using
```javascript
var fs = require('fs');
var path = require('path');
var LineToLine = require('line-to-line').LineToLine;

var lineToLine = new LineToLine(fs.createReadStream(path.normalize('./path/file.csv')));

lineToLine.on('line', (line, lineCount, byteCount) => {
  console.log(line);
  console.log(lineCount);
  console.log(byteCount);
  console.log();
});

lineToLine.on('open', fd => console.log(fd));
lineToLine.on('error', err => console.log(err));
lineToLine.on('close', () => console.log('close'));
```

# License
- MIT

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