UNPKG
opm-cli
Version:
latest (1.1.0)
1.1.0
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Unofficial package manager for Sponge's Ore Plugin Repository.
gitlab.com/forester-jaden/opm
opm-cli
/
lib
/
util
/
attempt-json.ts
8 lines
(7 loc)
•
141 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
export
default
function
attemptJson
(
json
:
string
):
object
|
string
{
try
{
return
JSON
.
parse
(json); }
catch
{
return
json; } }