| var XML_CHARACTER_MAP = { | |
| '&': '&', | |
| '"': '"', | |
| "'": ''', | |
| '<': '<', | |
| '>': '>' | |
| }; | |
| 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.