pageSize: (Number) Change the number of lines that will be rendered when using list, rawList, expand or checkbox.when: (Function, Boolean) Receive the current user answers hash and should return true or false depending on whether or not this question should be asked.The transformation only impacts what is shown while editing. transformer: (Function) Receive the user input, answers hash and option flags, and return a transformed value to display to the user.The value returned will be added to the Answers hash. Returns the filtered value to be used inside the program. filter: (Function) Receive the user input and answers hash.If false is returned, a default error message is provided. Should return true if the value is valid, and an error message ( String) otherwise. validate: (Function) Receive the user input and answers hash.The choices array can also contain a Separator. If defined as a function, the first parameter will be the current inquirer session answers.Īrray values can be simple numbers, strings, or objects containing a name (to display in list), a value (to save in the answers hash), and a short (to display after selection) properties. choices: (Array|Function) Choices array or a function returning a choices array.If defined as a function, the first parameter will be the current inquirer session answers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |