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

readline2

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

readline2 - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

15

index.js

@@ -7,6 +7,5 @@ /**

"use strict";
var _ = require("lodash");
var readline = require("readline");
var MuteStream = require("mute-stream");
var chalk = require("chalk");
var stripAnsi = require("strip-ansi");

@@ -43,4 +42,6 @@

// Fix bug with refreshLine
rl._refreshLine = _.wrap(rl._refreshLine, function( func ) {
func.call(rl);
var _refreshLine = rl._refreshLine;
rl._refreshLine = function() {
_refreshLine.call(rl);
var line = this._prompt + this.line;

@@ -51,3 +52,3 @@ var cursorPos = this._getCursorPos();

readline.moveCursor(this.output, cursorPos.cols, 0);
});
};

@@ -58,3 +59,3 @@ // Returns current cursor's position and line

var strBeforeCursor = this._prompt + this.line.substring(0, this.cursor);
var dispPos = this._getDisplayPos(chalk.stripColor(strBeforeCursor));
var dispPos = this._getDisplayPos(strBeforeCursor);
var cols = dispPos.cols;

@@ -78,3 +79,3 @@ var rows = dispPos.rows;

var code;
str = chalk.stripColor(str);
str = stripAnsi(str);
for (var i = 0, len = str.length; i < len; i++) {

@@ -81,0 +82,0 @@ code = codePointAt(str, i);

{
"name": "readline2",
"version": "0.1.0",
"version": "0.1.1",
"description": "Readline Façade fixing bugs and issues found in releases 0.8 and 0.10",
"main": "index.js",
"scripts": {
"test": "mocha -R spec"
},
"repository": {
"type": "git",
"url": "git://github.com/SBoudrias/readline2.git"
},
"repository": "SBoudrias/readline2",
"keywords": [

@@ -17,18 +13,19 @@ "cli",

"readline",
"tty"
"tty",
"ansi"
],
"author": "Simon Boudrias <admin@simonboudrias.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/SBoudrias/readline2/issues"
},
"homepage": "https://github.com/SBoudrias/readline2",
"files": [
"index.js"
],
"dependencies": {
"mute-stream": "0.0.4",
"lodash": "~2.4.1",
"chalk": "~0.4.0"
"strip-ansi": "^2.0.1"
},
"devDependencies": {
"sinon": "~1.7.3"
"chalk": "^0.5.1",
"mocha": "^2.1.0",
"sinon": "^1.7.3"
}
}

@@ -1,2 +0,2 @@

readline2 [![Build Status](https://secure.travis-ci.org/SBoudrias/readline2.png?branch=master)](http://travis-ci.org/SBoudrias/readline2)
readline2 [![Build Status](https://travis-ci.org/SBoudrias/readline2.png?branch=master)](https://travis-ci.org/SBoudrias/readline2)
=========

@@ -18,3 +18,3 @@

Present the same API as [node.js readline.createInterface()](http://nodejs.org/api/readline.html)
Present the same API as [Node.js `readline.createInterface()`](http://nodejs.org/api/readline.html)

@@ -21,0 +21,0 @@ #### Improvements

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