UNPKG

@scalar/api-client

Version:

the open source API testing client

18 lines (17 loc) 495 B
import { replaceVariables as a } from "@scalar/helpers/regex/replace-variables"; import { mergeUrls as l } from "@scalar/helpers/url/merge-urls"; import { getEnvironmentVariables as p } from "./get-environment-variables.js"; import { getServerUrl as c } from "./get-server-url.js"; const U = ({ environment: e, server: t, path: o, pathVariables: i, urlParams: m }) => { const r = p(e), n = c(t, r), s = a(o, { ...r, ...i }); return l(n, s, m); }; export { U as getResolvedUrl };