Rev 3510 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import htmlParse from 'html-react-parser';
export const parse = (str) => {
if (typeof str !== 'string') return '';
const stripText = str.replace(/<p>|<\/p>/g, '');
return htmlParse(stripText);
};
export const parseHelperToSelect = (data) => {
return Object.entries(data).map(([key, value]) => ({
label: value,
value: key
}));
};