0.1.1 • Published 9 years ago
range-prompt v0.1.1
range-prompt
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.
Installing
npm install range-promptUsage
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'))Related
date-promptmail-promptmultiselect-promptnumber-promptselect-prompttext-prompttree-select-promptcli-autocompleteswitch-prompt
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.
