Cotal TypeScript packages
    Preparing search index...

    Function wrapWords

    • text in lines of at most width display columns, broken at spaces, or only between the given words. A word wider than width keeps a line of its own, so an identity, path or command is never split. Below 20 columns, and when the output is not a terminal, nothing is wrapped.

      Parameters

      • text: string | readonly string[]
      • width: number

      Returns string[]