@cto.af/string-width - v4.0.2
    Preparing search index...

    Interface StringWidthOptions

    Options for creating a StringWidth instance.

    interface StringWidthOptions {
        extraWidths?: ExtraWidths;
        includeANSI?: boolean;
        isCJK?: boolean;
        locale?: string;
    }
    Index

    Properties

    extraWidths?: ExtraWidths

    A lookup map for code points whose width you would like to override. Might be a Map<number, number>, UnicodeTrie, or anything else that has a get(codePoint: number) => number method.

    includeANSI?: boolean

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

    isCJK?: boolean

    If specified, override using the script of the locale to determine whether we are in a CJK context.

    locale?: string

    The locale to use for grapheme segmentation and to determine if we are in a CJK context for code points that have ambiguous East Asian Width. Defaults to systems's locale.