whiptail
Version:
Whiptail wrapper for nodejs
52 lines (33 loc) • 1.36 kB
Markdown
whiptail wrapper for nodejs
[](https://github.com/131/whiptail/actions/workflows/test.yml)
[](https://coveralls.io/github/131/whiptail?branch=master)
[](https://www.npmjs.com/package/whiptail)
[](http://opensource.org/licenses/MIT)

```
npm install whiptail
```
```
const Whiptail = require('whiptail');
var whiptail = new Whiptail(); //some options
(async function(){
var choices = {
"abc" : "this is a foo",
"bar" : "this is a bar",
};
await whiptail.msgbox("Are you okay");
var name = await whiptail.inputbox("Enter your name");
console.log({name});
var res = await whiptail.menu("Choose a stuff", choices);
console.log({res});
res = await whiptail.checklist("Choose anoter stuff", choices);
console.log({res});
res = await whiptail.checklist("Choose the last stuff", choices);
console.log({res});
})();
```
* [131](https://github.com/131)