| const ESCAPE_SCRIPT_END = /<\/script>/gi | |
| const ESCAPE_LINE_TERMS = /[\u2028\u2029]/g | |
| /** @internal */ | |
| export function escapeJson(spec: unknown): string { | |
| return JSON.stringify(spec) | |
| .replace(ESCAPE_SCRIPT_END, "<\\/script>") | |
| .replace(ESCAPE_LINE_TERMS, (c) => c === "\u2028" ? "\\u2028" : "\\u2029") | |
| } | |
| /** @internal */ | |
| export function escape(str: string): string { | |
| return str | |
| .replace(/&/g, "&") | |
| .replace(/</g, "<") | |
| .replace(/>/g, ">") | |
| } | |
Xet Storage Details
- Size:
- 475 Bytes
- Xet hash:
- 39511ba7f606142b8542891faf7518e9b6356c96820f6b10ec41ed5146046772
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.