返回 CodeWhale
json-ld.ts
根目录 / web / lib / json-ld.ts
1 /** Serialize JSON-LD so a `</script>` in extracted text cannot break the tag. */
2 export function serializeJsonLd(value: unknown): string {
3 return JSON.stringify(value).replace(/</g, "\\u003c");
4 }
5
5 lines TYPESCRIPT