UNPKG

@momentum-ui/react-collaboration

Version:

Cisco Momentum UI Framework for React Collaboration Applications

22 lines 842 B
/** * Cleans the param of any leading or trailing spaces and non-string values * @param secondLine * @returns an array containing all trimmed, non-empty strings in secondLine */ export var cleanSecondLine = function (secondLine) { if (secondLine === null || secondLine === undefined) { return []; } var secondLineArray = typeof secondLine === 'string' ? [secondLine] : secondLine; var secondLineArrayClean = secondLineArray.reduce(function (filteredArray, nextElement) { if (typeof nextElement === 'string') { var nextElementClean = nextElement.trim(); if (nextElementClean) { filteredArray.push(nextElementClean); } } return filteredArray; }, []); return secondLineArrayClean; }; //# sourceMappingURL=SpaceRowContent.utils.js.map