unescape es-toolkit
Converts HTML entity characters to their original characters.
Usage
unescape(str)
Use unescape when you want to convert HTML entity characters back to their original characters. It converts HTML entities like &, <, >, ", ' to &, <, >, ", ' characters. This is the inverse operation of the escape function.
Useful when processing data from HTML forms or URLs:
Parameters
strstringrequired
The string to convert.
Returns
Returns a string with HTML entities converted to their original characters.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.