Spaces:
Running
Running
Download src/utils/classnames.ts from thuongvv/TranslateGemma-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 360 Bytes
-
https://huggingface.co/spaces/thuongvv/TranslateGemma-WebGPU/resolve/e734e02c73925afba1e916d53b3e0e6f38720bee/src/utils/classnames.ts
- Command line
-
hf download hf://spaces/thuongvv/TranslateGemma-WebGPU@e734e02c73925afba1e916d53b3e0e6f38720bee/src/utils/classnames.ts
-
curl -L -o classnames.ts https://huggingface.co/spaces/thuongvv/TranslateGemma-WebGPU/resolve/e734e02c73925afba1e916d53b3e0e6f38720bee/src/utils/classnames.ts
360 Bytes
| const cn = (...classes: Array<Record<string, boolean> | string>): string => | |
| classes | |
| .map((entry) => | |
| typeof entry === "string" | |
| ? entry | |
| : Object.entries(entry || {}) | |
| .filter(([, append]) => append) | |
| .map(([cl]) => cl) | |
| .join(" ") | |
| ) | |
| .filter((e) => e !== "") | |
| .join(" "); | |
| export default cn; | |