effect-tree - v1.0.36
    Preparing search index...

    Function hPadPart

    • Pad a part with left and right padding filled with the optional padding, by default the space character.

      At the keys left and right you will find versions that pad only a single side of the given part.

      See vPadPart for the vertical version.

      Parameters

      • fillLeft: string = ' '
      • fillRight: string = ' '

      Returns (padLeft?: number, padRight?: number) => EndoOf<Draw.Part>

      import {Draw} from 'effect-tree'
      const {drawPart, hPadPart, text} = Draw

      const part = text('foo')

      const padded = hPadPart('←', '→')(1, 2)(part)

      expect(drawPart(padded)).toEqual(['←foo→→'])
    Index

    Properties

    Properties

    left: (fillLeft?: string, padLeft?: number) => EndoOf<Draw.Part> = ...
    right: (fillRight?: string, padRight?: number) => EndoOf<Draw.Part> = ...