Gathering detailed insights and metrics for n-readlines-next
Gathering detailed insights and metrics for n-readlines-next
Gathering detailed insights and metrics for n-readlines-next
Gathering detailed insights and metrics for n-readlines-next
Read large text files line by line (synchronous) for Node.js
npm install n-readlines-next
Typescript
Module System
Min. Node Version
Node Version
NPM Version
74.4
Supply Chain
90.9
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
61 Commits
1 Branches
1 Contributors
Updated on May 23, 2020
Minified
Minified + Gzipped
Latest Version
1.0.3
Package Id
n-readlines-next@1.0.3
Unpacked Size
126.69 kB
Size
20.09 kB
File Count
54
NPM Version
6.14.4
Node Version
12.4.0
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
1
node-readlines-next
is a fork of node-readlines
! A package developed by Yoan Arnaudov! Original Repo here
The author wasn't active for 2 years up to now!
I took the deliberate to Fork it! Merged one PR (One bring better performance) [check here]! And added typescript declarations!
Also if any PR are send! I'll make sure to treat them!
Reading file line by line may seem like a trivial problem, but in node, there is no straightforward way to do it. There are a lot of libraries using Transform Streams to achieve it, but it seems like a overkill, so I've wrote simple version using only the filesystem
module of node. Note that this is synchronous library.
Install with
npm install n-readlines-next
Arguments
filename
- String path to the file you want to read fromfd
- File descriptoroptions
- Object
readChunk
- Integer number of bytes to read at once. Default: 1024newLineCharacter
- String new line character, only works with one byte characters for now. Default: \n
which is 0x0a
hex encodednode-readlines
can handle files without newLineCharacter after the last line
Returns buffer
with the line data without the newLineCharacter
or false
if end of file is reached.
Resets the pointer and starts from the beginning of the file. This works only if the end is not reached.
1var ReadLines = require('n-readlines'); 2var liner = new ReadLines('./textFile.txt'); 3 4var line; 5var lineNumber = 0; 6while (line = liner.next()) { 7 console.log('Line ' + lineNumber + ': ' + line.toString('ascii')); 8 lineNumber++; 9} 10 11console.log('end of line reached');
For imports and types
1import LineReader, { ReadLinesOptions } from 'n-readlines-next';
1export class CsvReader { 2 private _lineReader: LineReader; 3}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
9 existing vulnerabilities detected
Details
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-05-05
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