Files
lodash/_escapeHtmlChar.js
John-David Dalton edb45df54b Bump to v4.14.0.
2016-07-24 09:52:04 -07:00

24 lines
531 B
JavaScript

define(['./_basePropertyOf'], function(basePropertyOf) {
/** 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.
*/
var escapeHtmlChar = basePropertyOf(htmlEscapes);
return escapeHtmlChar;
});