![]() Let us know if you want to be added to the list (just tweet Help, we'd like to keep a list of testers for each terminal/OS so we can contact you and We're looking to offer good support for multiple prompts and environments. Feel free to send typo fixes and better docs! npm test to run the test suite.Īdd documentation for every API change. Please add a unit test for every new feature or bug fix. Please refer to the GitHub releases section for the changelog Contributing Windows network streams - Running Inquirer together with network streams in Windows platform inside some terminals can result in process hang. To fix this, add to your grunt-exec config stdio: 'inherit'. Grunt-exec - Calling a node script that uses Inquirer from grunt-exec can cause the program to crash. in the configuration file or pass -no-stdin in the CLI. Either return a promise or use this.async() to get a callback you'll call with the final value. waitUserInput: (Boolean) Flag to enable/disable wait for user input before opening system editor - Defaults: trueĭefault, choices(if defined as functions), validate, filter and when functions can be called asynchronously.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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |