Files
llink/js/desktop/src/lib/utils.ts
T
Arjun PatelandGitHub a8a0b7db1b infra: add linting and formatting for js projects (#230)
* wip

* wip

* wip

* format

* wip(mobile): lint and format

* cleanup

* nits

* nits

* idiomatic react

* nit

* format all root files
2026-06-02 07:44:24 -07:00

16 lines
400 B
TypeScript

import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function getInitials(email: string): string {
const prefix = email.split('@')[0] ?? '';
return prefix.slice(0, 2).toUpperCase();
}
export function removeDuplicates<T>(array: T[]): T[] {
return [...new Set(array)];
}