chayns-components
Version:
A set of beautiful React components for developing chayns® applications.
19 lines (17 loc) • 399 B
JavaScript
;
exports.__esModule = true;
exports.default = void 0;
const HTML_REGEX = /<[^>]*>/g;
const removeHtml = txt => {
let text = txt;
const tags = text.match(HTML_REGEX);
if (Array.isArray(tags)) {
tags.forEach(tag => {
text = text.replace(tag, '');
});
}
return text;
};
var _default = removeHtml;
exports.default = _default;
//# sourceMappingURL=removeHtml.js.map