Interface: NormalizeWhitespaceOptions
Defined in: utils/string/normalizeWhitespace.ts:4
Options for normalizeWhitespace.
Properties
collapse?
optionalcollapse:boolean
Defined in: utils/string/normalizeWhitespace.ts:11
Whether to collapse multiple whitespace characters into a single space (or a single newline when line breaks are preserved).
Defaults to true.
trim?
optionaltrim:boolean
Defined in: utils/string/normalizeWhitespace.ts:21
Whether to trim leading and trailing whitespace.
- When
preserveLineBreaksisfalse, the whole string is trimmed. - When
true, each line is trimmed individually.
Defaults to true.
preserveLineBreaks?
optionalpreserveLineBreaks:boolean
Defined in: utils/string/normalizeWhitespace.ts:31
Whether to preserve line breaks.
- When
false(default), all whitespace, including newlines, is collapsed to a single space. - When
true, line breaks are kept but surrounding spaces are normalized.
