![]() 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. default: (String|Number|Boolean|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s).Defaults to the value of name (followed by a colon). message: (String|Function) The question to print.If the name contains periods, it will define a path in the answers hash. name: (String) The name to use when storing the answer in the answers hash.Defaults: input - Possible values: input, number, confirm, list, rawlist, expand, checkbox, password, editor */ ) ObjectsĪ question object is a hash containing question related values: createPromptModule ( ) prompt ( questions ).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |