MultiLoader-Template/node_modules/es-toolkit/dist/string/escape.js
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

17 lines
319 B
JavaScript

'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const htmlEscapes = {
'&': '&',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
};
function escape(str) {
return str.replace(/[&<>"']/g, match => htmlEscapes[match]);
}
exports.escape = escape;