UNPKG
@joyid/common
Version:
latest (0.2.1)
0.2.1
0.2.0
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
Shared code for JoyID SDK
github.com/nervina-labs/joyid-sdk-js
nervina-labs/joyid-sdk-js
@joyid/common
/
src
/
utils
/
func.ts
9 lines
(8 loc)
•
129 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
export
const
safeExec
= <T>(
fn
: (
) =>
T): T |
null
=> {
try
{
return
fn
(
) }
catch
(
error
)
{
//
return
null
} }