Graduation / ui /node_modules /lodash-es /_escapeHtmlChar.js
DuyTa's picture
Upload folder using huggingface_hub
bc20498 verified
raw
history blame
477 Bytes
import basePropertyOf from './_basePropertyOf.js';
/** 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);
export default escapeHtmlChar;