Optional
ellipsisOptional
escapeFunction 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.
Optional
firstIf 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.
Optional
hyphenString to use when long word is split to next line with LineWrap.OVERFLOW_ANYWHERE.
Optional
includeIf true, include ANSI escape sequences in the width of the string. If false, strips ANSI before calculating width.
Optional
indentIf 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).
Optional
indentIf indent is a number, use that
many of this string to indent. Defaults to " "
(a single space).
Optional
indentIf the input string is empty, should we still indent?
Optional
indentIndent the first line? If not, treat the first line as if it was already indented, giving a short first line.
Optional
isIf specified, override CJK detection by locale.
Optional
isRegular 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.
Optional
localeWhich locale to use when splitting by graphemes? Defaults to current locale of system, as calculated by the JS runtime.
Optional
newlineString to insert at the end of every line, including the last one.
Optional
newlineFor every newline found with
isNewline, insert this string. Defaults to " "
(single space).
Optional
overflowWhat to do with words that are longer than the line width?
Optional
verboseTurn on verbose logging for debugging purposes.
Optional
widthMaximum number of graphemes per line, including indentation.
String to use when long word is truncated with LineWrap.OVERFLOW_CLIP.