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
/
optional-numeric-serializer.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
4 lines
155 Bytes
Copy permalink
Copy
Raw
1
import
{
isDefined
}
from
"
./is-defined
"
2
3
export
const
optionalNumericSerializer
=
(
value
)
=>
4
isDefined
(
value
)
&&
value
!==
null
?
Number
(
value
)
:
value