source: node_modules/es-toolkit/dist/string/unescape.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 358 bytes
Line 
1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5const htmlUnescapes = {
6 '&amp;': '&',
7 '&lt;': '<',
8 '&gt;': '>',
9 '&quot;': '"',
10 '&#39;': "'",
11};
12function unescape(str) {
13 return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, match => htmlUnescapes[match] || "'");
14}
15
16exports.unescape = unescape;
Note: See TracBrowser for help on using the repository browser.