Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
select-shell
Advanced tools
list of select for nodejs on terminal.
###Install
$ npm install select-shell
###Using
Navigate with arrows
Up and Down - Navigates on the options
Right - Check the option
Left - Uncheck the option
Enter/Return - confirms the options selected
Esc - Cancel/Exit
###Code
'use strict';
var selectShell = require('./index');
var stream = process.stdin;
var select = selectShell();
/*
select.option(text, value)
Value is optinal. The default value is equal the text.
*/
select.option('One', 1)
.option('Two', 2)
.option('Three', 3)
.select();
select.on('select', function(options){
/* Return the options selected. Ex.: [{ text: '', value: '' }] or { text: '', value: '' } depends the config multiSelect */
console.log(options);
process.exit(0);
});
select.on('cancel', function(options){
/* Return the options selected. Ex.: [{ text: '', value: '' }] or { text: '', value: '' } depends the config multiSelect */
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',
multiSelect: true
}
);
###The scheme of color is equal to the module colors.
FAQs
list of select for nodejs on terminal.
The npm package select-shell receives a total of 6 weekly downloads. As such, select-shell popularity was classified as not popular.
We found that select-shell demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.