Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

310 B
Raw Blame
import { createId } from "../create-id";

export const createWorkspaceId = () => {
  const workspaceId = createId({ prefix: "ws_" });

  // guard against collisions with old workspace ID format
  if (workspaceId.toLowerCase().startsWith("ws_c")) {
    return createWorkspaceId();
  }

  return workspaceId;
};