ok-tools
Version:
My personal JS tools and utilities
17 lines • 403 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.specChars = void 0;
var map = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
'\'': '''
};
function specChars(input) {
return input.replace(/[&<>"']/g,
// @ts-ignore
function (m) { return map[m]; });
}
exports.specChars = specChars;
//# sourceMappingURL=spec-chars.js.map