# for-each-line

> Read a text file line by line, calls a callback, returns a promise that is resolved when file is completed

Latest version **1.0.0** (published 2017-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install for-each-line
pnpm add for-each-line
yarn add for-each-line
bun add for-each-line
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-09-08 |
| First published | 2017-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Andrei Kashcha |
| Maintainers | anvaka |
| Keywords | read, file, line-by-line |

## Links

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

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-09-08

## README

# for-each-line

Read a text file line by line, calls a callback, returns a promise that is resolved when file is completed

# usage

``` js
const forEachLine = require('for-each-line');

forEachLine(fileName, (line) => {
  console.log(line);
}).then(() => {
  console.log('Done!')
});
```

## why?

I've been copy-pasting this code over and over, and I got tired of it it.
So created this module. It's only 26 lines.


# license

MIT

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