export const funEncodeHTML = function (str) {
  if (typeof str === 'string') {
    return str.replace(/<|&|>/g, (matches) => {
      const res = ({
        '<': '<',
        '>': '>',
        '&': '&',
      })[matches];
      return res ?? '';
    });
  }
  return '';
};    
    










