Files
2025-11-28 19:45:44 -07: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;