diff options
Diffstat (limited to 'deps/npm/node_modules/lodash/internal/escapeHtmlChar.js')
-rw-r--r-- | deps/npm/node_modules/lodash/internal/escapeHtmlChar.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/npm/node_modules/lodash/internal/escapeHtmlChar.js b/deps/npm/node_modules/lodash/internal/escapeHtmlChar.js new file mode 100644 index 0000000000..b21e452b5b --- /dev/null +++ b/deps/npm/node_modules/lodash/internal/escapeHtmlChar.js @@ -0,0 +1,22 @@ +/** Used to map characters to HTML entities. */ +var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' +}; + +/** + * 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; |