Code & Deploy
siGit Code
Git Hosting
Toggle menu
siGit Code
Git Hosting
Sign in
Sign in
@davoodmehraban89
/
medusa
Fork
0
medusa
/
www
/
packages
/
docs-utils
/
src
/
oas-file-to-path.ts
Code
Commits
Issues
Pulls
Cloud Agent
CICD
security/codeql-dependabot-gitleaks
automation/medusa-upstream-review
main
project/medusa-foundation-audit
security/codeql-dependabot-gitleaks
ts
5 lines
167 Bytes
Copy permalink
Copy
Raw
1
export
function
oasFileToPath
(
fileName
:
string
):
string
{
2
return
`/
${
fileName
3
.
replaceAll
(
/
(?<
!
\{[^
}
]
*
)
_
(?![^
{
]
*
\})
/g
,
"
/
"
)
4
.
replace
(
/
\.[
A-Za-z
]
+$/
,
""
)}
`
5
}