@nightgrey/ansi
    Preparing search index...

    Variable wrapConst

    wrap: (string: string, columns: number, options?: WrapOptions) => string = ...

    Wrap words to the specified column width.

    Type declaration

      • (string: string, columns: number, options?: WrapOptions): string
      • Parameters

        • string: string

          A string with ANSI escape codes, like one styled by chalk. Newline characters will be normalized to \n.

        • columns: number

          The number of columns to wrap the text to.

        • Optionaloptions: WrapOptions

          Wrapping options

        Returns string

    import chalk from 'chalk';
    import { wrap } from './wrap';

    const input = 'The quick brown ' + chalk.red('fox jumped over ') +
    'the lazy ' + chalk.green('dog and then ran away with the unicorn.');

    console.log(wrap(input, 20));