|
Last change
on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
653 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | /**
|
|---|
| 2 | * Converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `str` to their corresponding characters.
|
|---|
| 3 | * It is the inverse of `escape`.
|
|---|
| 4 | *
|
|---|
| 5 | * @param {string} str The string to unescape.
|
|---|
| 6 | * @returns {string} Returns the unescaped string.
|
|---|
| 7 | *
|
|---|
| 8 | * @example
|
|---|
| 9 | * unescape('This is a <div> element.'); // returns 'This is a <div> element.'
|
|---|
| 10 | * unescape('This is a "quote"'); // returns 'This is a "quote"'
|
|---|
| 11 | * unescape('This is a 'quote''); // returns 'This is a 'quote''
|
|---|
| 12 | * unescape('This is a & symbol'); // returns 'This is a & symbol'
|
|---|
| 13 | */
|
|---|
| 14 | declare function unescape(str: string): string;
|
|---|
| 15 |
|
|---|
| 16 | export { unescape };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.