mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-02 00:49:59 +08:00
22 lines
477 B
JavaScript
22 lines
477 B
JavaScript
|
|
import basePropertyOf from './_basePropertyOf.js';
|
||
|
|
|
||
|
|
/** 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.
|
||
|
|
*/
|
||
|
|
var escapeHtmlChar = basePropertyOf(htmlEscapes);
|
||
|
|
|
||
|
|
export default escapeHtmlChar;
|