

askAnswered: (Boolean) Force to prompt the question if the answer already exists.suffix: (String) Change the default suffix message.prefix: (String) Change the default prefix message.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. 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 ).
