Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

readline

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

readline - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "readline",
"version": "0.0.6",
"version": "0.0.7",
"description": "Simple streaming readline module.",

@@ -5,0 +5,0 @@ "main": "readline.js",

@@ -40,3 +40,6 @@ var fs = require('fs'),

// Emit last line if anything left over since EOF won't trigger it.
if (line.length) emit(line, lineCount);
if (line.length){
lineCount++;
emit(line, lineCount);
}
self.emit('end');

@@ -43,0 +46,0 @@ })

@@ -6,3 +6,4 @@ ## _readline_

## Important. In node 10 there is a core module named readline. Please use linebyline instead, it is the same module just renamed
## Important. In node 10 there is a core module named readline. Please use linebyline instead, it is the same module just renamed:
[Npm linebyline](https://www.npmjs.com/package/linebyline)

@@ -13,2 +14,10 @@ ```sh

## Test
```sh
npm install .
npm test
```
## What's this?

@@ -15,0 +24,0 @@

@@ -6,3 +6,3 @@ var test = require("tap").test;

var rl = readLine('./fixtures/afile.txt');
rl.on("line", function (line){
rl.on("line", function (line,linecount){
t.ok(null !== line && undefined !== line);

@@ -28,3 +28,3 @@ });

console.error(i,answer);
t.ok(answer === i, "I is wrong " + i);
t.ok(answer === i, "answered");
t.end();

@@ -50,1 +50,16 @@ });

test("line count", function(t){
var rl = readLine('./fixtures/nmbr.txt');
var expect = 7;
var actual = 0;
rl.on("line", function (line, ln){
console.log("line",line,ln);
actual=ln;
});
rl.on("end", function (){
t.ok(actual === expect,"line count is correct");
t.end();
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc