reports/frontend/node_modules/es-toolkit/dist/compat/string/unescape.mjs
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

21 lines
806 B
JavaScript

import { unescape as unescape$1 } from "../../string/unescape.mjs";
import { toString } from "../util/toString.mjs";
//#region src/compat/string/unescape.ts
/**
* Converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `str` to their corresponding characters.
* It is the inverse of `escape`.
*
* @param str The string to unescape.
* @returns Returns the unescaped string.
*
* @example
* unescape('This is a &lt;div&gt; element.'); // returns 'This is a <div> element.'
* unescape('This is a &quot;quote&quot;'); // returns 'This is a "quote"'
* unescape('This is a &#39;quote&#39;'); // returns 'This is a 'quote''
* unescape('This is a &amp; symbol'); // returns 'This is a & symbol'
*/
function unescape(str) {
return unescape$1(toString(str));
}
//#endregion
export { unescape };