linebyline
Advanced tools
Comparing version
{ | ||
"name": "linebyline", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Simple streaming readline module.", | ||
@@ -5,0 +5,0 @@ "main": "readline.js", |
@@ -32,4 +32,6 @@ var fs = require('fs'), | ||
if (data[i] == 10 || data[i] == 13) { // Newline char was found. | ||
lineCount++; | ||
if (lineLength) emit(lineCount, byteCount); | ||
if (data[i] == 10) { | ||
lineCount++; | ||
emit(lineCount, byteCount); | ||
} | ||
} else { | ||
@@ -36,0 +38,0 @@ lineBuffer[lineLength] = data[i]; // Buffer new line data. |
158
1.28%1957105
-1.11%7
-58.82%