@sebbo2002/vestaboard - v5.0.1-develop.12
    Preparing search index...

    Class Message

    You can build a message like this:

    import { Message } from '@sebbo2002/vestaboard';

    const myMessage = new Message('Hello World');

    // same as

    const myOtherMessage = new Message()
    .write('Hello World')
    .center();
    Index

    Constructors

    Accessors

    Methods

    • Center the current message content

      Returns void

    • Fills the board with the passed character or text. The text is repeated again and again until the board is completely filled.

      Parameters

      • text: string = ' '

      Returns this

    • Generate a table with the given data

      Parameters

      • rows: string[][]

      Returns this

      new Message().table([
      ['now', 'Daily'],
      ['13:00', 'Super Secret Meeting'],
      ['16:30', 'Awesome Presentation']
      ])

      #==============================================#
      # N O W D A I L Y #
      # #
      # 1 3 : 0 0 S U P E R S E C R E T #
      # M E E T I N G #
      # #
      # 1 6 : 3 0 A W E S O M E P R E S E N T - #
      #==============================================#
    • Write a text on your new message. If your message is not empty it will continue where you last left off (position: MessageWritePosition.CURRENT). Alternatively you can continue on the next line or give an exact position.

      Parameters

      Returns this

    • Parameters

      • char: string

      Returns number[]

    • Parameters

      • char: number

      Returns string

    • Parameters

      • chars: number[]

      Returns number[]

    • Parameters

      • chars: number[]
      • lineLength: [number, number]

      Returns number[][]