Version 1
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / _escapeHtmlChar.js
diff --git a/node_modules/grunt-legacy-log-utils/node_modules/lodash/_escapeHtmlChar.js b/node_modules/grunt-legacy-log-utils/node_modules/lodash/_escapeHtmlChar.js
new file mode 100644 (file)
index 0000000..b21e452
--- /dev/null
@@ -0,0 +1,22 @@
+/** Used to map characters to HTML entities. */
+var htmlEscapes = {
+  '&': '&',
+  '<': '&lt;',
+  '>': '&gt;',
+  '"': '&quot;',
+  "'": '&#39;',
+  '`': '&#96;'
+};
+
+/**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+function escapeHtmlChar(chr) {
+  return htmlEscapes[chr];
+}
+
+module.exports = escapeHtmlChar;