New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cli-interact

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-interact - npm Package Compare versions

Comparing version

to
0.1.8

11

index.js

@@ -36,3 +36,3 @@ //==============================

var flagAllowNoAnswer;
var flagReturnNumber;
var flagReturnNumeric;
var i;

@@ -50,4 +50,4 @@ var numChoices = choices.length;

}
if (opts.returnNumber) {
flagReturnNumber = true;
if (opts.returnNumeric) {
flagReturnNumeric = true;
}

@@ -77,7 +77,6 @@ }

if ((value >= 1) && (value <= numChoices)) {
value -= 1; // user input is 1-based; choices array is 0-based
if (flagReturnNumber) {
if (flagReturnNumeric) {
return value;
} else {
return choices[value];
return choices[value - 1]; // user input is 1-based; choices array is 0-based
}

@@ -84,0 +83,0 @@ }

{
"name": "cli-interact",
"version": "0.1.7",
"version": "0.1.8",
"title": "cli interact",

@@ -5,0 +5,0 @@ "description": "Simple helper tools for interacting synchronously with user at command line",