UNPKG
magic-helper
Version:
latest (1.0.0)
1.0.0
this is magic helper
magic-helper
/
src
/
h5
/
toScan.ts
15 lines
(13 loc)
•
293 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
type
{
ScanParams
}
from
'../types'
import
{ action }
from
'./action'
export
const
toScan
= (
config
:
ScanParams
) => {
const
{ targetUrl, fail } = config
action
({
actionType
:
'scan'
, targetUrl }).
catch
(
(
err
) =>
{
if
(fail) {
fail
(err) } }) }