UNPKG

ice.fo.utils

Version:

14 lines (10 loc) 288 B
import getValue from '../Getter/getValue'; export default function makeSvcAPI(target, tid = 'api') { if (typeof target == 'string') { return target; } target = target.item || target; if (tid == 'api') { return `/svc/${getValue(target.category)}/${target.apiId}`; } }