Class: TerminalAdapter

TerminalAdapter

new TerminalAdapter()

TerminalAdapter is the default implementation of Adapter, an abstraction layer that defines the I/O interactions.

It provides a CLI interaction

Source:

Members

log :env/log

Logging utility

Type:
  • env/log
Source:

Methods

diff(actual, expected)

Shows a color-based diff of two strings

Parameters:
Name Type Description
actual string
expected string
Source:

prompt(questions, callback)

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 Description
questions Array
callback function
Source: