listr-input
Input module for Listr
Install
$ npm install --save listr-input
Usage
const Listr = ;const input = ;const got = ; const list = title: 'Retrieving data' ; list;
API
input(question, [options])
Returns an Observable which asks for user input.
question
Type: string
Question to ask.
options
default
Type: string
Default value to use if nothing is entered.
validate
Type: function
Function which accepts the provided value. Should return true
if the value is valid, false
otherwise.
secret
Type: boolean
Default: false
Mark the input as secret.
done
Type: function
Function that will be invoked when the user has answered the question.
autoSubmit
Type: function
Function which accepts the provided value. If returns true
then the value will be submitted automatically.
License
MIT © Sam Verschueren