Function box

  • Generates a contained box of text.

    Parameters

    Returns string[]

    The lines of the box in an array.

  • Generates a contained box of text.

    Parameters

    • input: string[]

      An array of lines of text.

    • width: number

      The external width of the box.

    • Optional title: string

      The title of the box.

    • Optional style: BoxStyle

      The box style.

    • Optional sizer: Sizer

      A sizer for handling unrendered characters in the input.

    • Optional color: StringTransformer

      A colorizer for the borders of the box.

    Returns string[]