Download resources/js/lib/utils.ts from lifedebugger/CAPS04-FE-REFACTOR-2: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/spaces/lifedebugger/CAPS04-FE-REFACTOR-2/resolve/main/resources/js/lib/utils.ts
- Command line
-
hf download hf://spaces/lifedebugger/CAPS04-FE-REFACTOR-2/resources/js/lib/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/lifedebugger/CAPS04-FE-REFACTOR-2/resolve/main/resources/js/lib/utils.ts
383 Bytes
| import type { InertiaLinkProps } from '@inertiajs/react'; | |
| import { clsx } from 'clsx'; | |
| import type { ClassValue } from 'clsx'; | |
| import { twMerge } from 'tailwind-merge'; | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)); | |
| } | |
| export function toUrl(url: NonNullable<InertiaLinkProps['href']>): string { | |
| return typeof url === 'string' ? url : url.url; | |
| } | |