Download packages/client/src/lib/utils.ts from QSLY/ghp: direct link, hf CLI and curl.
- Browser
- Download file 515 Bytes
-
https://huggingface.co/spaces/QSLY/ghp/resolve/main/packages/client/src/lib/utils.ts
- Command line
-
hf download hf://spaces/QSLY/ghp/packages/client/src/lib/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/QSLY/ghp/resolve/main/packages/client/src/lib/utils.ts
515 Bytes
| import { clsx, type ClassValue } from 'clsx' | |
| import { twMerge } from 'tailwind-merge' | |
| import type { Track } from '@music-together/shared' | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)) | |
| } | |
| /** Stable UI key for a playable track. Bilibili multi-part tracks share sourceId, | |
| * while urlId includes the selected page CID and keeps their checked state distinct. */ | |
| export const trackKey = (t: Pick<Track, 'source' | 'sourceId' | 'urlId'>): string => `${t.source}:${t.urlId || t.sourceId}` | |