MCPcopy
hub / github.com/pingdotgg/uploadthing / resolveMaybeUrlArg

Function resolveMaybeUrlArg

packages/shared/src/utils.ts:283–287  ·  view source on GitHub ↗
(maybeUrl: string | URL | undefined)

Source from the content-addressed store, hash-verified

281 * `<VERCEL_URL || localhost>/api/uploadthing`
282 */
283export const resolveMaybeUrlArg = (maybeUrl: string | URL | undefined): URL => {
284 return maybeUrl instanceof URL
285 ? maybeUrl
286 : Micro.runSync(getFullApiUrl(maybeUrl));
287};
288
289export function parseTimeToSeconds(time: Time) {
290 if (typeof time === "number") return time;

Callers 15

generateReactHelpersFunction · 0.90
UploadDropzoneFunction · 0.90
UploadButtonFunction · 0.90
generateUploadButtonFunction · 0.90
generateUploadDropzoneFunction · 0.90
generateUploaderFunction · 0.90
controllableUploadFunction · 0.90
controllableUploadFunction · 0.90
typedUploadFilesFunction · 0.90
generateSolidHelpersFunction · 0.90
UploadDropzoneFunction · 0.90
UploadButtonFunction · 0.90

Calls 1

getFullApiUrlFunction · 0.85

Tested by

no test coverage detected