Confirm-simple

confirm-simple

A simple command-line tool to confirm.

If you have written CLI apps, you would have for sure come across a senario of taking an action based on the users choice.

confirm-simple as the name says it's a simple to use util that would help you to confirm users choice with ease.

Install it: npm install --save confirm-simple

API and simple usage:

1
2
3
4
5
6
7
8
9
var confirm = require('confirm-simple')

confirm('Do you accept the EULA?', ['yes', 'no'] ,function (yes) {
    if (yes) {
      console.log('Good for you!');
    } else {
      console.log('Sorry you wont get to use the software');
    }
});

GIF FTW!

Thanks to YouBao Nong for confirm-simple.

Suggest a module

Comments