Gathering detailed insights and metrics for node-line-reader
Gathering detailed insights and metrics for node-line-reader
Gathering detailed insights and metrics for node-line-reader
Gathering detailed insights and metrics for node-line-reader
Node Line Reader is a node.js module that helps you reading lines of text from a file.
npm install node-line-reader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
78.4
Supply Chain
99.5
Quality
75.2
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
10 Stars
32 Commits
1 Watchers
2 Branches
2 Contributors
Updated on Sep 15, 2023
Latest Version
0.0.3
Package Id
node-line-reader@0.0.3
Size
10.33 kB
NPM Version
6.4.1
Node Version
11.5.0
Published on
Jan 15, 2019
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Node Line Reader is a Node.js module that helps you reading lines of text from a file.
Features:
Installation:
npm install node-line-reader
LineReader
1var path = require('path'); 2var LineReader = require('node-line-reader').LineReader; 3 4var reader = new LineReader(path.join('/home/user', 'some-file.txt')); 5 6// Each execution of nextLine will get a following line of text from the input file 7reader.nextLine(function (err, line) { 8 if (!err) { 9 console.log('file line: ', line); 10 } 11});
LineTransform
1var stream = getSomeReadableStream(); // Create read stream 2var LineTransform = require('node-line-reader').LineTransform; // LineTransform constructor 3var transform = new LineTransform(); 4 5stream.pipe(transform); // Pipe input from a file stream over to line transform 6 7transform.on('data', function(line) { 8 // line - single line of text from input file 9}); 10 11transform.on('end', function() { 12 // no more text lines 13});
LineFilter
1var stream = getSomeReadableStream(); // Create read stream 2var LineTransform = require('node-line-reader').LineTransform; // LineTransform constructor 3var LineFilter = require('node-line-reader').LineFilter; // LineFilter constructor 4 5var transform = new LineTransform(); 6 7// Skip empty lines and lines with "et" (with leading and trailing space) in them 8var filter = new LineFilter({ skipEmpty: true, exclude: [/\bet\b/ }); 9 10// Pipe input from a file stream over to line transform and to the filter 11stream.pipe(transform).pipe(filter); 12 13filter.on('data', function(line) { 14 // line - single line of text from input file 15}); 16 17filter.on('end', function() { 18 // no more text lines 19});
LineReader
LineReader
is a text lines reader from a specified file.
This function reads another line of text from a specified file and passes it over to the callback method.
The callback has arguments (err, line)
. The err
argument is an error that occurred while reading a line of text (null
if no error occurred). The line
is a string with line of text from a specified input file.
LineFilter
LineFilter
is a duplex stream passing through lines of text matching include and exclude rules. LineFilter
instance can be piped into antoher Writable instance.
The LineFilter
accepts options objects with following parameters:
skipEmpty
- boolean value blocking empty linesskipBlank
- boolean value blocking blank lines (lines composed of whitespace characters)include
- a single instance or an array of regular expressions (see below for text filtering rules)exclude
- a single instance or an array of regular expressions (see below for text filtering rules)Text filtering rules:
include
pattern(s) are provided, filter will pass through lines of text which are matched by the include pattern(s) onlyexclude
pattern(s) are provided, fillter will pass through all lines except the ones which are matched by the exclude pattern(s) onlyinclude
and exclude
pattern(s) are provided, filter filter will pass through lines of text which are matched by the include pattern(s) and not matched by the exclude pattern(s)When a line of text can be read from the transform, it will emit a 'readable' event.
line
Buffer | String The line of text.This event fires when there will be no more test to read.
As Stream 'close' event: Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this.
As Stream 'close' event: Emitted if there was an error receiving data.
LineTransform
LineTransform
is a duplex stream converting input text into lines of text. LineTransform
instance can be piped into antoher Writable instance.
When a line of text can be read from the transform, it will emit a 'readable' event.
line
Buffer | String The line of text.This event fires when there will be no more test to read.
As Stream 'close' event: Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this.
As Stream 'close' event: Emitted if there was an error receiving data.
Writen by Tom Pawlak - Blog
The MIT License (MIT)
Copyright © 2014 Tom Pawlak
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More