Download next.js/packages/next/src/next-devtools/dev-overlay/utils/cx.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 327 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/next-devtools/dev-overlay/utils/cx.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/next-devtools/dev-overlay/utils/cx.ts
-
curl -L -o cx.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/next-devtools/dev-overlay/utils/cx.ts
327 Bytes
| /** | |
| * Merge multiple args to a single string with spaces. Useful for merging class names. | |
| * @example | |
| * cx('foo', 'bar') // 'foo bar' | |
| * cx('foo', null, 'bar', undefined, 'baz', false) // 'foo bar baz' | |
| */ | |
| export function cx(...args: (string | undefined | null | false)[]): string { | |
| return args.filter(Boolean).join(' ') | |
| } | |