Code & Deploy
siGit Code
Git Hosting
Toggle menu
siGit Code
Git Hosting
Sign in
Sign in
@davoodmehraban89
/
medusa
Fork
0
medusa
/
www
/
packages
/
docs-ui
/
src
/
utils
/
get-json-ld.ts
Code
Commits
Issues
Pulls
Cloud Agent
CICD
main
automation/medusa-upstream-review
main
project/medusa-foundation-audit
security/codeql-dependabot-gitleaks
ts
5 lines
195 Bytes
Copy permalink
Copy
Raw
1
import
type
{
Thing
,
WithContext
}
from
"
schema-dts
"
2
3
export
function
getJsonLd
<
T
extends
Thing
>
(
data
:
WithContext
<
T
>
):
string
{
4
return
JSON
.
stringify
(
data
,
null
,
2
).
replace
(
/</g
,
"
\\
u003c
"
)
5
}