1.0.0 • Published 1 year ago
call-or-return v1.0.0
call-or-return
如果 value 是函数,则将 payload 作为参数传入, 返回返回值, 否则直接返回 value
Installtion
npm i call-or-return
Usage
import cor from 'call-or-return'
Props
参数名 | 说明 | 类型 | 必填 | 默认值 |
---|---|---|---|---|
value | 任意参数 | any/function | true | - |
payload | 如果 value 是函数, 则是 value 的参数 | any | false | - |
1.0.0
1 year ago