(str)
| 36 | * @returns {string} Cleaned string |
| 37 | */ |
| 38 | const stripMultiLinebreaks = (str) => { |
| 39 | return str.replace(/(\r\n|\n|\u2424){2,}/g, '\n').split('\n').map((line) => { |
| 40 | return WS_REGEXP.test(line) ? line.trim() : line |
| 41 | }).filter((line) => { |
| 42 | return line.length > 0 |
| 43 | }).join('\n') |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Replace all-whitespace sequences with a single space. |
no outgoing calls
no test coverage detected
searching dependent graphs…