Ghost
New
struxadotcloud
/
struxa
public
Star
0
Fork
0
Code
Issues
0
Pull requests
0
013aed1
1
branch
Go to file
t
Code
struxa
apps
web
src
lib
egg-features.ts
feat: Modrinth plugin & mod installer for Minecraft servers (#21)
eb4266b
3 months ago
8 lines · 275 B
1
export
function
parseEggFeatures
(
features
:
string
|
null
|
undefined
)
:
string
[]
{
2
try
{
3
const
parsed
:
4
return
Array
.
isArray
5
}
catch
{
6
return
[]
;
7
}
8
}
unknown
=
JSON
.
parse
(
features
??
"
[]
"
)
;
(
parsed
)
&&
parsed
.
every
(
(
f
)
=>
typeof
f
===
"
string
"
)
?
parsed
:
[]
;