UNPKG

@web3r/flowerkit

Version:

Tree-shakable JavaScript and TypeScript utility library for frontend/browser apps: DOM, events, arrays, objects, strings, date, JSON, and network helpers (ESM/CJS, SSR-friendly).

14 lines (13 loc) 538 B
export type TGetStrUnescapedArgs = Parameters<typeof getStrUnescaped>; export type TGetStrUnescapedReturn = ReturnType<typeof getStrUnescaped>; /** * Unescapes HTML entities back to their characters. * Unescaped: `&amp; &lt; &gt; &quot; &#39;` * @param {string} str Source string * @returns {string} Unescaped string * @throws {TypeError} If str is not a string * @example * getStrUnescaped("&lt;b&gt;Hello &amp; world&lt;/b&gt;"); * // => "<b>Hello & world</b>" */ export declare const getStrUnescaped: (str: string) => string;