Files
cunkebao_v3/SuperAdmin/lib/utils.ts

15 lines
329 B
TypeScript
Raw Normal View History

2025-04-09 09:45:06 +08:00
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
2025-04-09 14:07:54 +08:00
import crypto from "crypto"
2025-04-09 09:45:06 +08:00
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
2025-04-09 14:07:54 +08:00
/**
* MD5加密函数
*/
export function md5(text: string): string {
return crypto.createHash("md5").update(text).digest("hex")
}