unescape
Unescape HTML entities in a string.
Usage
js
import { unescape } from 'js-cool'Signature
typescript
function unescape(string: string): stringParameters
| Parameter | Type | Description |
|---|---|---|
string | string | The string to unescape |
Returns
string - The unescaped string.
Examples
js
unescape('<div>Hello</div>') // '<div>Hello</div>'
unescape('a & b') // 'a & b'
unescape('"hello"') // '"hello"'Related
- escape - Escape HTML special characters