src/modules/routes/helpers/parse-string-to-array.js
export default function parseStringToArray(words, delimiter) {
const cleanWords = cleanString(words);
return cleanWords ? cleanWords.split(delimiter || " ") : [];
}
function cleanString(words) {
return (words || "").replace(/\s+/g, " ").trim();
}