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

select-shell

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

select-shell

list of select for nodejs on terminal.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-98.99%
Maintainers
1
Weekly downloads
 
Created
Source

select-shell

list of select for nodejs on terminal.

####Install

  $ npm install select-shell

####Using

var select = require('select-shell')();
var stream = process.stdin;

/* 
  select.option(text, value)
  Value is optinal. The default value is equal the text.
*/
select.option('One')
      .option('Two')
      .option('Three')
      .list();

/*
  select.event is the a EventEmitter
*/
select.event.on('select', function(options){
  /* Return the options selected. Ex.: [{ text: '', value: '' }] */
  console.log(options);
  process.exit(0);
});

select.event.on('cancel', function(options){
  /* Return the options selected. Ex.: [{ text: '', value: '' }] */
  console.log('Cancel select, '+ options.length +' options selected');
  process.exit(0);
});

####Optional configs

var select = require('select-shell)(
  /* Default values */
  {
    pointer: '> ',
    pointerColor: 'white',
    checked: ' ✓',
    checkedColor: 'green',
    msgCancel: 'No selected options!',
    msgCancelColor: 'red'
  },
  /* Stream */
  stream
);

#####The scheme of color is equal to the module colors.

  • bold
  • italic
  • underline
  • inverse
  • yellow
  • cyan
  • white
  • magenta
  • green
  • red
  • grey
  • blue
  • rainbow
  • zebra
  • random

Keywords

FAQs

Package last updated on 29 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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