
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
streaming-lines
Advanced tools
Efficiently process text files line-by-line.
Streams are more efficient than reading an entire file into memory, especially when reading large files - some files are too large to do this. This package enables users to efficiently process large text files line-by-line.
NOTE: streaming-lines only handles utf-8 encode text.
Install the package, including TypeScript declarations.
npm i streaming-lines
Let's read from a file in the current directory and capitalize each line in the file.
const readlines = require('streaming-lines').readlines;
(async function () {
await readlines(__dirname + '/myfile.txt', (line) => {
line.toUpperCase();
});
})
import { readlines } from 'streaming-lines';
(async function () {
await readlines(__dirname + '/myfile.txt', (line: string) => {
line.toUpperCase();
});
})
Tests can be found in the test/ directory. They can be run with the
following command:
npm run test
Each file with a .test.ts extension will be executed using the
mocha testing framework.
FAQs
Efficiently process text files line-by-line.
We found that streaming-lines demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.