UNPKG

xe-utils

Version:

JavaScript 函数库、工具类

10 lines (8 loc) • 315 B
import staticEscapeMap from './staticEscapeMap.js';import helperFormatEscaper from './helperFormatEscaper.js';/** * 转义HTML字符串,替换&, <, >, ", ', `字符 * * @param {String} str 字符串 * @return {String} */ var escape = helperFormatEscaper(staticEscapeMap) export default escape