normalizeSpace
Collapse all whitespace sequences (spaces, tabs, newlines) to single spaces. Trim leading/trailing.
string(required): the string to normalize
utlx
{
spaces: normalizeSpace(" hello world "), // "hello world"
mixed: normalizeSpace("line1\n line2\t\tline3"), // "line1 line2 line3"
empty: normalizeSpace("") // ""
}