mirror of
https://github.com/Radarr/Radarr
synced 2025-12-14 12:23:11 +01:00
17 lines
257 B
JavaScript
17 lines
257 B
JavaScript
import _ from 'lodash';
|
|
|
|
function split(input, separator = ',') {
|
|
if (!input) {
|
|
return [];
|
|
}
|
|
|
|
return _.reduce(input.split(separator), (result, s) => {
|
|
if (s) {
|
|
result.push(s);
|
|
}
|
|
|
|
return result;
|
|
}, []);
|
|
}
|
|
|
|
export default split;
|