input.suggest
Prompts the user for input using Enquirer with the provided option configuration.
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
option | Object | Configuration object containing key, placeholder, and question. Properties
|
Returns:
The user's input response.
- Type:
- Promise.<Object>
Example
import { input } from "@jlongyam/cli";
let result = await input.suggest({
key: 'language',
question: 'primary language',
placeholder: 'english'
});
console.log(result.language)