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

inquirer-search-checkbox

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inquirer-search-checkbox - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

Makefile

11

dist/index.js

@@ -25,2 +25,3 @@ "use strict";

var chalk_1 = require("chalk");
var fuzzy = require("fuzzy");
var ignoreKeys = ["up", "down", "space"];

@@ -77,5 +78,3 @@ function getCheckbox(checked) {

var bottomContent = "";
var input = "";
var tip = chalk_1.default.dim("(Press <space> to select, <enter> to submit.)");
input = this.rl.line;
if (this.status === "answered") {

@@ -95,6 +94,6 @@ message += chalk_1.default.cyan(this.selection.join(", "));

SearchBox.prototype.filterChoices = function () {
var _this = this;
this.filterList = this.choices.filter(function (c) {
return c.name.toLocaleLowerCase().includes(_this.rl.line);
});
var options = {
extract: function (el) { return el.name; }
};
this.filterList = fuzzy.filter(this.rl.line, this.choices, options).map(function (el) { return el.original; });
};

@@ -101,0 +100,0 @@ SearchBox.prototype.toggleChoice = function (index) {

{
"name": "inquirer-search-checkbox",
"version": "0.1.1",
"version": "1.0.0",
"description": "Searchable Inquirer checkbox",

@@ -20,6 +20,7 @@ "main": "dist/index.js",

"dependencies": {
"inquirer": "^3.3.0",
"chalk": "^2.3.0",
"figures": "^2.0.0"
"figures": "^2.0.0",
"fuzzy": "^0.1.3",
"inquirer": "^3.3.0"
}
}

@@ -6,2 +6,3 @@ import Base = require("inquirer/lib/prompts/base");

import chalk from "chalk";
import * as fuzzy from "fuzzy";

@@ -79,5 +80,3 @@ interface Event {

var bottomContent = "";
var input = "";
const tip = chalk.dim("(Press <space> to select, <enter> to submit.)");
input = this.rl.line; // remove space

@@ -105,5 +104,7 @@ // Render choices or answer depending on the state

filterChoices() {
this.filterList = this.choices.filter(c =>
c.name.toLocaleLowerCase().includes(this.rl.line)
);
const options = {
extract: (el: Choice) => el.name
};
this.filterList = fuzzy.filter(this.rl.line, this.choices, options).map(el => el.original);
}

@@ -110,0 +111,0 @@

@@ -9,3 +9,2 @@ {

"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"removeComments": true,

@@ -12,0 +11,0 @@ "noUnusedLocals": true,

Sorry, the diff of this file is not supported yet

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