new TerminalAdapter(optionsopt)
TerminalAdapter is the default implementation of
Adapter, an abstraction layer that defines the
I/O interactions.
It provides a CLI interaction
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | <optional> |
Properties
|
Methods
-
diff(actual, expected, changes)
-
Shows a color-based diff of two strings
Parameters:
Name Type Description actualstring expectedstring changesArray returned by diff.
-
prompt(questions, answersopt, cbopt) → {Object}
-
Prompt a user for one or more questions and pass the answer(s) to the provided callback.
It shares its interface with
Base.prompt(Defined inside the constructor to keep interfaces separated between instances)
Parameters:
Name Type Attributes Description questionsObject | Array.<Object> answersObject <optional> Answers to be passed to inquirer
cbfunction <optional> Deprecated: callback for backward compatibility.
Returns:
Object -promise answers