Version 1
[yaffs-website] / node_modules / grunt-legacy-log / node_modules / lodash / internal / escapeHtmlChar.js
diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/internal/escapeHtmlChar.js b/node_modules/grunt-legacy-log/node_modules/lodash/internal/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;