summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/unescapeHtmlChar.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/unescapeHtmlChar.js')
-rw-r--r--tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/unescapeHtmlChar.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/unescapeHtmlChar.js b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/unescapeHtmlChar.js
new file mode 100644
index 0000000000..28b345498d
--- /dev/null
+++ b/tools/eslint/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/unescapeHtmlChar.js
@@ -0,0 +1,22 @@
+/** Used to map HTML entities to characters. */
+var htmlUnescapes = {
+ '&': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'",
+ '&#96;': '`'
+};
+
+/**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+function unescapeHtmlChar(chr) {
+ return htmlUnescapes[chr];
+}
+
+module.exports = unescapeHtmlChar;