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