redpeacock78/sushiro.js

View on GitHub
src/libs/unescapeHtml.ts

Summary

Maintainability
A
0 mins
Test Coverage
declare global {
  interface String {
    unescapeHtml(): string;
  }
}

String.prototype.unescapeHtml = function (): string {
  return this.replace(/&lt;/g, "<")
    .replace(/&gt;/g, ">")
    .replace(/&amp;/g, "&");
};

export {};