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

interactive-cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interactive-cli - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

23

index.js

@@ -5,3 +5,22 @@ const _ = require('lodash')

const numberToLetters = i => {
if (i >= ALPHABET.length) {
const firstLetter = Math.floor(i / ALPHABET.length)
const secondLetter = i - ALPHABET.length * firstLetter
return `${ALPHABET[firstLetter]}${ALPHABET[secondLetter]}`
}
return ALPHABET[i]
}
const lettersToNumber = letters => {
if (letters.length === 2) {
const firstLetter = ALPHABET.indexOf(letters[0])
const secondLetter = ALPHABET.indexOf(letters[1])
return firstLetter * ALPHABET.length + secondLetter
} else if (letters.length === 1) {
return ALPHABET.indexOf(letters[0])
}
}
// Error that should be thrown to exit to the start of the application

@@ -85,3 +104,3 @@ function DontContinue(message) {

optionKeys.forEach((optionKey, i) => {
console.log(`${ALPHABET[i]}) ${options[optionKey]}`)
console.log(`${numberToLetters(i)}) ${options[optionKey]}`)
})

@@ -97,3 +116,3 @@ console.log("q) Quit")

let selectedOption
const i = ALPHABET.indexOf(res)
const i = lettersToNumber(res)

@@ -100,0 +119,0 @@ // Only return null if defaultOptionText was specified

2

package.json
{
"name": "interactive-cli",
"version": "1.1.1",
"version": "1.1.2",
"description": "Making it easy to create interactive command line scripts in Node.js",

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

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