input.select

Prompts the user with a select menu using Enquirer and logs the selected response.

Parameters:
NameTypeDescription
optionObject

Configuration object containing the prompt details.

Properties
NameTypeDescription
keystring

The key for the response.

questionstring

The message to display to the user.

optionArray

The list of selectable choices.

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

let result = await input.select({
  key: 'word',
  question: 'choose one: ',
  option: ['one', 'two', 'three', 'four']
});

console.log(result.word);