Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

336 B
Raw Blame
// Renamed columns keep their slug because it is also the task status, so a
// new column's name can derive a slug that is already taken.
export function availableSlug(base: string, taken: ReadonlySet<string>) {
  let slug = base;
  for (let suffix = 2; taken.has(slug); suffix++) {
    slug = `${base}-${suffix}`;
  }
  return slug;
}