Files
better-auth/packages/scim/src/utils.ts
T

6 lines
259 B
TypeScript

export const getResourceURL = (path: string, baseURL: string) => {
const normalizedBaseURL = baseURL.endsWith("/") ? baseURL : `${baseURL}/`;
const normalizedPath = path.replace(/^\/+/, "");
return new URL(normalizedPath, normalizedBaseURL).toString();
};