https://github.com/yviscool/inquirer-checkbox-plus
inquirer-checkbox-plus
https://github.com/yviscool/inquirer-checkbox-plus
cli prompts
Last synced: 4 days ago
JSON representation
inquirer-checkbox-plus
- Host: GitHub
- URL: https://github.com/yviscool/inquirer-checkbox-plus
- Owner: yviscool
- Created: 2018-07-04T16:06:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-16T04:18:01.000Z (over 3 years ago)
- Last Synced: 2025-08-09T08:41:43.553Z (10 months ago)
- Topics: cli, prompts
- Language: JavaScript
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# inquirer-checkbox-plus
Inspired by [inquirer-checkbox-plus-prompt](https://github.com/faressoft/inquirer-checkbox-plus-prompt)
### Installation
``` shell
npm install inquirer-checkbox-plus
```
### Usage
```javascript
inquirer.registerPrompt('checkbox-plus', require('inquirer-checkbox-plus'));
inquirer.prompt({
type: 'checkbox-plus',
...
})
```
### options
Takes `type`, `name`, `message`, `source`[ `filter`, `validate`, `default`, `pageSize`, `highlight`, `searchable`, `enablebackspace`, `answer`,`footer`,`header`,`keypress`,`searching`,`noresult`] properties.
* **highlight**: (Function/Boolean)
* **answer**: (Function)
* **header**: (Function/String)
* **footer**: (Function/String)
* **searching**: (Function/String)
* **noresult**: (Function/String)
* **enablebackspace**: (Boolean) If `true`, backspace will not emit `keypress` event
* **keypress** : (Function), args (events, validation, prompt), events is a observable which can bind any keypress event, validation is observable which can be used with events, prompt is this
see `example.js`
### category

Do not enable `searchable` options.
```javascript
inquirer.prompt([{
type: 'checkbox-plus',
...
source: function (answersSoFar, input) {
return Promise.resolve(...)
},
subsource: function (choice, type) {
...
return Promise.resolve([])
}
}])atch(console.log)
```
use `gg/G` key to return the top/bottom. `h/l` key to change the cagetory.
see `example01.js`