Files
lodash/_escapeHtmlChar.js
John-David Dalton 0b9ddff408 Bump to v4.16.0.
2016-09-17 22:24:52 -07:00

23 lines
513 B
JavaScript

define(['./_basePropertyOf'], function(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);
return escapeHtmlChar;
});