open-nomad/ui/tests/integration/cleanWhitespace.js

7 lines
130 B
JavaScript
Raw Normal View History

export default function cleanWhitespace(string) {
return string
.replace(/\n/g, '')
.replace(/ +/g, ' ')
.trim();
}