UNPKG

@scalar/api-client

Version:

the open source API testing client

11 lines (10 loc) 376 B
const c = (o, r) => { var s; const { requestUid: a, method: e, path: t } = r ?? {}; return a || ((s = Object.values(o).find( (d) => d.path.toLowerCase() === (t == null ? void 0 : t.toLowerCase()) && d.method.toLowerCase() === (e == null ? void 0 : e.toLowerCase()) )) == null ? void 0 : s.uid) || Object.keys(o)[0]; }; export { c as getRequestUidByPathMethod };