Skip to main content
variable unescapeHTML
import { unescapeHTML } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Unescapes escaped HTML characters.

Use String.prototype.replace() with a regex that matches the characters that need to be unescaped, using a callback function to replace each escaped character instance with its associated unescaped character using a dictionary (object).

type

(str: string) => unknown