mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-29 21:25:43 +00:00
19 lines
392 B
TypeScript
19 lines
392 B
TypeScript
import { clsx, type ClassValue } from "clsx"
|
|
import { twMerge } from "tailwind-merge"
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs))
|
|
}
|
|
|
|
export const isValidUrl = (url: string) => {
|
|
try {
|
|
new URL(url)
|
|
return true
|
|
} catch (e) {
|
|
return false
|
|
}
|
|
}
|
|
|
|
export const capitalize = (str: string) => {
|
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
} |