input.confirm

Prompts the user with a confirmation question.

Parameters:
NameTypeDescription
optionObject

Contains the key and question for the prompt.

Properties
NameTypeDescription
keystring

The key for the response.

questionstring

The message to display to the user.

Returns:

The user's response.

Type: 
Promise.<Object>
Example
import { input } from "@jlongyam/cli";

let result = await input.confirm({
  key: 'ok',
  question: 'are you agree with this'
});

if(result.ok) {
  console.log('good choise')
} else {
  console.log('too bad')
}