@cto.af/linewrap - v3.2.1
    Preparing search index...

    Interface LineWrapOptions

    interface LineWrapOptions {
        ellipsis?: string;
        escape?: EscapeString;
        firstCol?: number;
        hyphen?: string;
        includeANSI?: boolean;
        indent?: string | number;
        indentChar?: string;
        indentEmpty?: boolean;
        indentFirst?: boolean;
        isCJK?: boolean;
        isNewline?: Splitter;
        locale?: string;
        newline?: string;
        newlineReplacement?: string;
        overflow?: symbol;
        verbose?: boolean;
        width?: number;
    }
    Index

    Properties

    ellipsis?: string

    String to use when long word is truncated with LineWrap.OVERFLOW_CLIP.

    escape?: EscapeString

    Function to escape the input string. The escaping is performed after line breaking, with the intent that in the final display, those escapes will be replaced appropriately. Defaults to an identity transform.

    firstCol?: number

    If indentFirst is false, how many columns was the first line already indented? If NaN, use the indent width, in display cells. If indentFirst is true, this is ignored.

    hyphen?: string

    String to use when long word is split to next line with LineWrap.OVERFLOW_ANYWHERE.

    includeANSI?: boolean

    If true, include ANSI escape sequences in the width of the string. If false, strips ANSI before calculating width.

    indent?: string | number

    If a string, indent every line with that string. If a number, insert that many indentChars at the beginning of each line. Defaults to "" (the empty string).

    indentChar?: string

    If indent is a number, use that many of this string to indent. Defaults to " " (a single space).

    indentEmpty?: boolean

    If the input string is empty, should we still indent?

    indentFirst?: boolean

    Indent the first line? If not, treat the first line as if it was already indented, giving a short first line.

    isCJK?: boolean

    If specified, override CJK detection by locale.

    isNewline?: Splitter

    Regular expression that finds newlines for replacement with newlineReplacement. Ensure you do not create a regular expression denial of service (ReDoS) attack. Make sure the expression has the g modifier.

    locale?: string

    Which locale to use when splitting by graphemes? Defaults to current locale of system, as calculated by the JS runtime.

    newline?: string

    String to insert at the end of every line, including the last one.

    newlineReplacement?: string

    For every newline found with isNewline, insert this string. Defaults to " " (single space).

    overflow?: symbol

    What to do with words that are longer than the line width?

    verbose?: boolean

    Turn on verbose logging for debugging purposes.

    width?: number

    Maximum number of graphemes per line, including indentation.