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

@rizzlesauce/inquirer-autocomplete-prompt

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rizzlesauce/inquirer-autocomplete-prompt - npm Package Compare versions

Comparing version 1.0.2-rossa.4 to 1.0.2-rossa.5

17

index.js

@@ -38,2 +38,3 @@ // @flow

this.paginator = new Paginator();
this.transformChoice = this.opt.transformChoice || (option => option);
}

@@ -93,3 +94,3 @@

} else if (this.currentChoices.length) {
var choicesStr = listRender(this.currentChoices, this.selected);
var choicesStr = listRender(this.currentChoices, this.selected, this.opt.styleSelected);
content += this.rl.line;

@@ -131,2 +132,5 @@ var indexPosition = this.selected;

onSubmit(line /* : string */) {
if (!this.opt.suggestOnly) {
line = this.transformChoice(line);
}
if (typeof this.opt.validate === 'function' && this.opt.suggestOnly) {

@@ -243,3 +247,4 @@ var validationResult = this.opt.validate(line);

this.rl.clearLine();
var autoCompleted = this.currentChoices.getChoice(this.selected).value;
var autoCompleted = this.transformChoice(
this.currentChoices.getChoice(this.selected).value);
this.rl.write(autoCompleted);

@@ -277,3 +282,3 @@ this.render();

*/
function listRender(choices, pointer /*: string */) /*: string */ {
function listRender(choices, pointer /*: string */, styleSelected /*: (text: string) => string */) /*: string */ {
var output = '';

@@ -293,3 +298,7 @@ var separatorOffset = 0;

if (isSelected) {
line = chalk.cyan(line);
if (styleSelected) {
line = styleSelected(line);
} else {
line = chalk.cyan(line);
}
}

@@ -296,0 +305,0 @@ output += line + ' \n';

{
"name": "@rizzlesauce/inquirer-autocomplete-prompt",
"description": "Autocomplete prompt for inquirer",
"version": "1.0.2-rossa.4",
"version": "1.0.2-rossa.5",
"files": [

@@ -6,0 +6,0 @@ "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