input.ask
Prompts the user for input using the enquirer library.
Parameters:
| Name | Type | Description |
|---|---|---|
option | Object | Contains the key and question for the prompt. |
Returns:
The user's response.
- Type:
- Promise.<Object>
Example
import { input } from "@jlongyam/cli";
let result = await input.ask({
key: 'name',
question: 'what is your name'
});
console.log(result.name);