A prompt to select a value in a range.
range-prompt uses cli-styles and prompt-skeleton to have a look & feel consistent with other prompts.
npm install range-prompt
const rangePrompt = require('range-prompt')
rangePrompt('How much ice cream would you like?', {
min: 0, max: 10, value: 2, step: .1, unit: 'kg'
})
.on('data', (item) => console.log('Changed to', item, 'kg'))
.on('abort', (item) => console.log('You aborted, having chosen', item, 'kg'))
.on('submit', (item) => console.log('You chose', item, 'kg'))
date-prompt
mail-prompt
multiselect-prompt
number-prompt
select-prompt
text-prompt
tree-select-prompt
cli-autocomplete
switch-prompt
If you have a question, found a bug or want to propose a feature, have a look at the issues page.