function splitString(str) { if (str) { if (str.length == 0) { return [] } else { if (str.indexOf(',') != -1) { return str } else { return str.split(',') } } } } export default splitString