Code & Deploy
siGit Code
Git Hosting
Toggle menu
siGit Code
Git Hosting
Sign in
Sign in
@davoodmehraban89
/
medusa
Fork
0
medusa
/
packages
/
core
/
utils
/
src
/
common
/
normalize-csv-value.ts
Code
Commits
Issues
Pulls
Cloud Agent
CICD
main
automation/medusa-upstream-review
main
project/medusa-foundation-audit
security/codeql-dependabot-gitleaks
ts
10 lines
239 Bytes
Copy permalink
Copy
Raw
1
/**
2
* Normalizes a CSV value by removing the leading "\r" from the
3
* value.
4
*/
5
export
function
normalizeCSVValue
<
T
>
(
value
:
T
):
T
{
6
if
(
typeof
value
===
"
string
"
)
{
7
return
value
.
replace
(
/
\\
r$/
,
""
).
trim
()
as
T
8
}
9
return
value
10
}