tahamajs/IE / Projects /front /node_modules /xml /lib /escapeForXML.js
tahamajs's picture
download
raw
358 Bytes
var XML_CHARACTER_MAP = {
'&': '&',
'"': '"',
"'": ''',
'<': '&lt;',
'>': '&gt;'
};
function escapeForXML(string) {
return string && string.replace
? string.replace(/([&"<>'])/g, function(str, item) {
return XML_CHARACTER_MAP[item];
})
: string;
}
module.exports = escapeForXML;

Xet Storage Details

Size:
358 Bytes
·
Xet hash:
4186af4ca3184b998f3e3763b001acf3933a90013299def64c4f26bb18860334

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.