Class Debugger

The Debugger() class provides basics console interaction for the unit.

Hierarchy

  • Debugger

Constructors

Properties

unit: string

Methods

  • The dump() method dumps any data into the console similar to console.log().

    Parameters

    • data: any

    Returns void

  • The err() method logs the given text message to the console similar to console.error().

    Parameters

    • message: any

      Any preferred string message.

    Returns void

  • The info() method logs the given text message to the console.

    Parameters

    • message: string

      Any preferred string message.

    Returns void

  • The loadingInfo() method prints a spinner with a given message to the console.

    Returns

    A spinner controller.

    Parameters

    • loadingText: string

      Any preferred string message.

    Returns Ora

  • The pauseForAnyKey() method pauses the runtime for any user produced keypress.

    Parameters

    • text: string = 'Press any key to continue.'

      Any preferred string text.

    Returns void

  • The pauseForQuestion() method pauses the runtime for a user produced text answer.

    Returns

    The user produced text answer.

    Parameters

    • question: string

      Any preferred string question.

    Returns string

  • The pauseForYNQuestion() method pauses the runtime for a user produced y/n answer.

    Returns

    true when user answer 'y' or 'yes'.

    Parameters

    • question: string = 'Are you sure?'

      Any preferred string question.

    Returns boolean

  • The table() method dumps any array data as a table into the console similar to console.table().

    Parameters

    • data: any

    Returns void

  • The warn() method logs the given text message to the console similar to console.warn().

    Parameters

    • message: string

      Any preferred string message.

    Returns void

  • Private

    The debugTimestamp() method returns runtime's timestamp in HH:MM:SS format.

    Returns string

Generated using TypeDoc